Código JavaScript para Analytics for Advertising
Somente anunciantes com o Advertising DSP
Para o Advertising DSP, a integração Analytics for Advertising rastreia interações de site view-through e click-through. As visitas click-through são rastreadas pelo código Adobe Analytics padrão em suas páginas da Web; o código Analytics captura os parâmetros de ID do AMO e ID do EF no URL da página de aterrissagem e os rastreia nos respectivos eVars reservados. Você pode rastrear visitas de view-through implantando um trecho do JavaScript em suas páginas da Web.
Na primeira exibição de página de uma visita ao site, o código JavaScript do Adobe Advertising verifica se o visitante viu ou clicou anteriormente em um anúncio. Se o usuário tiver entrado anteriormente no site por um click-through ou não tiver visto um anúncio, o visitante será ignorado. Se o visitante tiver visto um anúncio e não tiver entrado no site por um click-through durante a janela de pesquisa de cliques definida no Adobe Advertising, o código JavaScript do Adobe Advertising a) usará o Serviço de Experience Cloud ID para gerar uma ID complementar (SDID) ou b) usará o método generateRandomID do Adobe Experience Platform Web SDK para gerar um StitchID. Qualquer ID é usada para compilar dados do Adobe Advertising na ocorrência do Adobe Analytics do visitante. Em seguida, o Adobe Analytics consulta o Adobe Advertising para obter a ID do AMO e a ID do EF associadas à exposição do anúncio. A ID do AMO e as IDs EF são preenchidas em seus respectivos eVars. Esses valores persistem por um período designado (por padrão, 60 dias).
O Analytics envia métricas de tráfego do site (como exibições de página, visitas e tempo gasto) e quaisquer eventos personalizados ou padrão do Analytics para o Adobe Advertising de hora em hora, usando a ID de EF como chave. Essas Analytics métricas são executadas pelo sistema de atribuição do Adobe Advertising para conectar as conversões ao histórico de cliques e exposição.
Implantação do código JavaScript
A biblioteca do JavaScript consiste em duas linhas que permitem que o Analytics e o Adobe Advertising se comuniquem entre si. If the Analytics for Advertising integration was completed during the Adobe Advertising implementation, then you should have already received this code with instructions on how to deploy it.
The code
Implementations that use the Experience Cloud Identity Service visitorAPI.js code
<script src="https://www.everestjs.net/static/le/last-event-tag-latest.min.js">
<script>
if("undefined" != typeof AdCloudEvent)
AdCloudEvent('IMS ORG Id','rsid');
</script>
Implementations that use the Experience Platform Web SDK alloy.jscode
<script src="https://www.everestjs.net/static/le/last-event-tag-latest.min.js">
<script>
if("undefined" != typeof AdCloudEvent)
stitchId = AdCloudEvent('IMS ORG Id','rsid').generateRandomId();
</script>
Where to place the code
The Analytics for Advertising JavaScript function must come after the Experience Cloud ID Service but before your Analytics App Measurement code. This ensures that the supplemental ID (SDID) or StitchID is included in your Analytics call.
Validating code deployment
You can perform validation using any packet sniffer type of tool (such as Charles, Fiddler, or Chrome Developer Tools) by comparing the values of the four IDs between the request going to Adobe Advertising and the request going to Analytics, as outlined below.
How to confirm the code with Chrome Developer Tools validate-js-chrome
-
Open Chrome Developer Tools and click the Network tab.
-
Load a website page that contains the Analytics for Advertising JavaScript.
-
Filter the Network tab by
lastand review two rows:-
The first row is the call to the JavaScript library and is titled
last-event-tag-latest.min.js. -
The second row is the call sending the request to Adobe Advertising. It begins as follows:
_les_imsOrgId=[your_imsOrgId_here]&_les_url=[your_encoded_url]If you don’t see the call to Adobe Advertising, then it might not be the first page view of your visit. For testing purposes, you can remove the cookie so that the next call is the first page view for the corresponding visit:
- On the Application tab, find the
adcloudcookie, and verify that the cookie contains_les_v(last visit) with a value ofyand a UTC epoch timestamp that expires in 30 minutes.- Delete the
adcloudcookie and refresh the page.
- Delete the
-
-
(Implementations that use the Experience Cloud Identity Service
visitorAPI.jscode) Filter on/b/ssto see the Analytics hit. -
(Implementations that use the Experience Platform Web SDK
alloy.jscode) Filter on/interactto verify that the request payload to the Edge Network containsadvertisingStitchID. -
Compare the ID values between the two hits. All of the values should be in query string parameters except for the report suite ID in the Analytics hit, which is the URL path immediately after
/b/ss/.table 0-row-4 1-row-4 2-row-4 3-row-4 4-row-4 5-row-4 ID Analytics Parameter Edge Network Adobe Advertising Parameter Experience Cloud IMS Org mcorgid_les_imsOrgidSupplemental Data ID sdid _les_sdidStitch ID stitchId advertisingStitchIDunder the_adcloudpropertyAnalytics Report Suite The value after /b/ss/_les_rsidExperience Cloud Visitor ID mid _les_midIf the ID values match, then the JavaScript implementation is confirmed. Adobe Advertising sends the Analytics server any click-through or view-through tracking details if they exist.
How to confirm the code with Adobe Experience Platform Debugger
-
Open the Adobe Experience Platform Debugger on your homepage.
-
Go to the Network tab.
-
In the Solutions Filter toolbar, click Adobe Advertising and Analytics.
-
In the Request URL - Hostname parameter row, locate
lasteventf-tm.everesttech.net. -
In the Request - Parameters row, audit the signals generated, similar to Step 3 in “How to Confirm the Code with Chrome Developer Tools.”
- (Implementações que usam o código
visitorAPI.jsdo Experience Cloud Identity Service) Verifique se o parâmetroSdidcorresponde aoSupplemental Data IDno filtro do Adobe Analytics. - (Implementações que usam o código
alloy.jsdo Web SDK do Experience Platform) Verifique se o valor do parâmetroadvertisingStitchIDcorresponde aoSdidenviado ao Edge Network do Experience Platform. - Se o código não estiver sendo gerado, verifique se o cookie do Adobe Advertising foi removido na guia Application. Depois de removida, atualize a página e repita o processo.
- (Implementações que usam o código