DTM Injecting JS Code on AEM Web Pages for Analytics Integration

Avatar

Avatar
Contributor 2
Level 8
AEM_Forum
Level 8

Likes

147 likes

Total Posts

631 posts

Correct reply

4 solutions
Top badges earned
Contributor 2
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Contributor 2
Level 8
AEM_Forum
Level 8

Likes

147 likes

Total Posts

631 posts

Correct reply

4 solutions
Top badges earned
Contributor 2
Validate 100
Validate 50
Validate 25
Validate 10
View profile
AEM_Forum
Level 8

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)

Avatar

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,331 posts

Correct reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,331 posts

Correct reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile
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)