DTM Injecting JS Code on AEM Web Pages for Analytics Integration

AEM_Forum

10-10-2017

Hi all,

If we need to Inject JS Code on AEM Web Pages for Analytics Integration, do we do it on templates or components or both?

I agree that DTM is a good tool for this.

Even if we use DTM, where will it inject?

If we are able to do it only on templates, the effort will be less.

Also, will it be the same JS code on all pages?

Appreciate all your responses.

Thanks,

Rama.

Accepted Solutions (1)

Accepted Solutions (1)

jantzen_belliston-Adobe

Community Manager

10-10-2017

Hi Rama,

For DTM, any non-Adobe JS code would be placed in the third-party section within a tool or rule. Where you decide to place the code will determine if it is loaded on every page or a limited set of pages.

If you'd like it to load on every page, you could place the code in one of the tools or create a page load rule without conditions that would fire on every page. Otherwise, you could use conditions to limit where the code would be placed on your site.

Thanks,
Jantzen

Answers (0)