Newbie question - how to track modal open|close|links

Avatar

Avatar

rafael_lopez-dm

Avatar

rafael_lopez-dm

rafael_lopez-dm

01-12-2020

Hi there,

 

Ive never worked with AA before so apologies for the beginner question. Ive been tasked to track a modal but after reading online documentation and the blogs of implementation experts (Jim Gordon, etc) Im still very confused by the many different ways of doing it. Seems like theres eVars, eProps, events, rules, dataLayer, and no dataLayer so im trying to understand whats the correct combination of things or the best way of setting up the following:

 

I need to create a tagging spec for:

1 - CTA button to open a modal

2 - CTA button to close a modal

3 - While the modal is open, track clicks to a 'learn more' link

     In GA i track this as follows:

window.dataLayer = window.dataLayer || []; window.dataLayer.push({

   'event': 'trackEvent',

   'category': 'modal',

   'action': 'link click',

   'label': '[clicked text]', // 'learn more'

   'linkUrl': '[clicked url]', // 'example.com/text'

});

 

4 - While the modal is open, track clicks to items (similar to anchor links but they are not links) that have each a date and time.

    In GA i track this as follows:

window.dataLayer = window.dataLayer || []; window.dataLayer.push({

   'event': 'trackEvent',

   'category': 'modal',

   'action': 'click',

   'label': '[clicked text]', // '06/06/2020 - 13:00PM'

});

 

Im very familiar with Google Analytics, GTM, JavaScript and dataLayers but not with AA and Launch so anything helps.

 

Thanks!

Rafa

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

Samrat_Dsouza

Avatar

Samrat_Dsouza

Samrat_Dsouza

02-12-2020

Hi Rafael

 

AA is more on the lines of GA4 tagging, it's more elaborate than just firing stuff into it and has to be thought through on the basis of reporting required than recording data. Also, we usually need to reduce tracking events by combining data to be passed where possible.

 

This can be done in many ways, a simplest way is:

Pass the value assetType+Name+event to the customLink value in custom link tracking. So it would be reported under custom link tracking report. Disadvantage is not many metrics are available for it. 

 

A more elaborate can be done in many ways, below is one of the way possible:

  • Use one eVar which stores asset name & Type, this could be a common one which stores modals, forms, accordions, pop-ups etc (like an event category but not actually that).
  • One event to record: open or start(forms)
  • Close: do we really need to record a close event(what's the advantage of it?) - If really required, could record both form submit and Close event in the same event.
  • Link Clicks leading to a page on the same site: pass the data to be tracked along with the next pageView.  

If pathing report is required then maybe create a prop and enable pathing for it and pass pageName (pageView event) to it and the assetType+Name+Event value in that same prop on the above events.   

 

So, for open:

Fire a custom link tracking with the pageName eVar(hope that's being done) and this asset eVar and event index used to record open.

Same with close.

 

Now, for linkClicks in the modal:

For links leading to a page on the same site; pass assetType+Name+Linktext to the same eVar along with the link pageView. 

For external links: Modify your externalLink click tracking to record assetType+Name+ext:Linktext in the same eVar. 

 

This is just one of the ways to do it, every reporting requirement will improvise the tracking methodology.

 

Adobe is way powerful than GA, just spend some time viewing the learning sessions or recordings on SDEC here:

https://rebrand.ly/2020-07-21-wp3ee

 

Cheers

Samrat Dsouza