Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

AEM & Google Analytics URL tracking

Avatar

Level 2

Use case I'm trying to solve for is such:

- We are pulling content for emails using Content API from AEM

- AEM is integrated with GA/GTM

 

Q: will the links in the email will automatically be tracking links?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

In general, you expose the links via the data layer (JS Code) from AEM and consume them in google analytics.

Refer this link on tracking from GA: https://www.ruleranalytics.com/blog/click-attribution/track-links-google-analytics/

View solution in original post

6 Replies

Avatar

Community Advisor

Hi @Nadia_Mac 

 

As per my understanding, you are asking whether the links in the email be automatically tracked. If my guess is right, the answer is No. You should write the code to track them.

 

Note: If there is already some existing code that tracks all your links, then it might work.

 

Let me know if I misunderstood your query.

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

 

Avatar

Level 2

Thanks @Kiran_Vedantam for your reply. Your guess is correct. Where would I write this code? and what type of code should I write to add the tracking to the urls in the email?

Avatar

Correct answer by
Community Advisor

In general, you expose the links via the data layer (JS Code) from AEM and consume them in google analytics.

Refer this link on tracking from GA: https://www.ruleranalytics.com/blog/click-attribution/track-links-google-analytics/

Avatar

Level 2

@Kiran_Vedantam Thank you for the answer. will take your suggestion in the implementation!

Avatar

Community Advisor

Links can't automaticlaly be tracked. You can create tag in GTM with some class (css) to track all links and it will push required details of triggered tag in GA

Or You can push required details to datalayer and make variable in GTM and track in GA.

https://www.analyticsmania.com/post/google-tag-manager-click-tracking/

 

 

Avatar

Level 2

@HeenaMadan 

Thank you for providing the details, will take your suggestions in mind.