Se sua implementação ainda usar o Código H, a Adobe recomenda migrar para a versão mais recente do AppMeasurement. Recomendamos a implementação do Analytics por meio de tags na Adobe Experience Platform. No entanto, uma implementação de JavaScript atualizada pode ser usada.
As seguintes alterações notáveis estão presentes no AppMeasurement quando comparadas ao Código H:
<head>
.dynamicAccountSelection
, dynamicAccountMatch
e dynamicAccountList
).As etapas a seguir descrevem um fluxo de trabalho de migração típico.
AppMeasurement.js
minificado, juntamente com os módulos de mídia e integração.s_code.js
paraAppMeasurement.js
: mova todo o código antes da seção DO NOT ALTER ANYTHING BELOW THIS LINE
no s_code.js
para o início do AppMeasurement.js
.s_code.js
arquivo. Esta etapa inclui os módulos Mídia e Integração.AppMeasurement.js
no servidor da Web.AppMeasurement.js
: verifique se todas as páginas fazem referência a AppMeasurement.js
em vez de s_code.js
.Um arquivo AppMeasurement.js
típico. Verifique se as variáveis de configuração estão definidas acima da função doPlugins
.
// Initialize AppMeasurement
var s = s_gi("examplersid");
/******** VISITOR ID SERVICE CONFIG - REQUIRES VisitorAPI.js ********/;
s.visitor=Visitor.getInstance("INSERT-MCORG-ID-HERE");
/************************** CONFIG SECTION **************************/;
/* You may add or alter any code config here. */
s.trackDownloadLinks = true;
s.trackExternalLinks = true;
s.trackInlineStats = true;
s.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx";
s.linkInternalFilters = "javascript:,example.com";
s.usePlugins = true;
function s_doPlugins(s) {
// Use implementation plug-ins that are defined below in this section
}
s.doPlugins = s_doPlugins;
/* WARNING: Changing any of the below variables will cause drastic
changes to how your visitor data is collected. Changes should only be
made when instructed to do so by your Adobe Account Team.*/
s.trackingServer="example.data.adobedc.net";
/************************** PLUGINS SECTION *************************/
// Copy and paste implementation plug-ins here. Plug-ins can then be used in the s_doPlugins(s) function above
/****************************** MODULES *****************************/
// Copy and paste implementation modules (Media, Integrate) here.
/* ============== DO NOT ALTER ANYTHING BELOW THIS LINE ! =============== */
Código comum que é carregado em cada página.
<script src="AppMeasurement.js"></script>
<script language="JavaScript" type="text/javascript">
s.pageName = "Example page name";
s.eVar1 = "Example eVar value";
s.events = "event1";
s.t();
</script>
Certifique-se de incluir uma referência a AppMeasurement.js
e VisitorAPI.js
em cada página. Consulte Implementação do JavaScript para obter mais informações.