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.

NOTE
A lógica de rastreamento do Adobe Advertising JavaScript ocorre no Adobe e, portanto, praticamente não afeta o tempo de carregamento da página.
Por outro lado, a lógica do conector de dados DCM para Analytics (usando Google Campaign Manager 360) para Advertising DSP ocorre no lado do cliente. A compilação no lado do cliente reduz o carregamento da página e aumenta o risco de perda de dados. Isso ocorre porque o JavaScript Analytics deve executar o ping de DoubleClick e esperar que DoubleClick retorne os últimos dados de clique/impressão para Analytics. Quando sua equipe do DSP configura o conector de dados do DCM, você deve especificar quanto tempo você deseja atrasar a página.

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.

Code placement

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

  1. Open Chrome Developer Tools and click the Network tab.

  2. Load a website page that contains the Analytics for Advertising JavaScript.

  3. Filter the Network tab by last and review two rows:

    Filtering on last

    • 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:

    1. On the Application tab, find the adcloud cookie, and verify that the cookie contains _les_v (last visit) with a value of y and a UTC epoch timestamp that expires in 30 minutes.
      1. Delete the adcloud cookie and refresh the page.
  4. (Implementations that use the Experience Cloud Identity Service visitorAPI.js code) Filter on /b/ss to see the Analytics hit.

    Filtering on /b/ss

  5. (Implementations that use the Experience Platform Web SDK alloy.jscode) Filter on /interact to verify that the request payload to the Edge Network contains advertisingStitchID.

    Filtering on /interact

  6. 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_imsOrgid
    Supplemental Data ID sdid _les_sdid
    Stitch ID stitchId advertisingStitchID under the _adcloud property
    Analytics Report Suite The value after /b/ss/ _les_rsid
    Experience Cloud Visitor ID mid _les_mid

    If 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

  1. Open the Adobe Experience Platform Debugger on your homepage.

  2. Go to the Network tab.

  3. In the Solutions Filter toolbar, click Adobe Advertising and Analytics.

  4. In the Request URL - Hostname parameter row, locate lasteventf-tm.everesttech.net.

  5. 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.js do Experience Cloud Identity Service) Verifique se o parâmetro Sdid corresponde ao Supplemental Data ID no filtro do Adobe Analytics.
    • (Implementações que usam o código alloy.js do Web SDK do Experience Platform) Verifique se o valor do parâmetro advertisingStitchID corresponde ao Sdid enviado 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.

    Auditando o código JavaScript Analytics for Advertising em Platform Cloud Debugger

recommendation-more-help
advertising-help-integrations