Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

Associating data with previous page in XDM/CJA

Avatar

Level 4

Hi,

I have a situation where I'm capturing the usage of a carousel component. If captures the number of times a user interacts with it. Since I don't want to send out a call every single time, the count is stored and sent on the subsequent page view. I want to report on the page name it happens on, as well as the instances on each page. Each page view captures the previous page name. How can I set this up so someone can see a report on this? I want user to be able to see "Page A" had X number of clicks. Page B" had X number of clicks. The dilemma is since this is not directly associated with the page it happened on; do I need a field in my schema for "pageNamesAssociatedWithCarouselClicks" just so I can have the breakdown by page name? Or am I missing something? 

 

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @MichaelJo13 ,

I personally haven't worked on such use case but if needed I'll explore the option to utilize either cookies or local storage to achieve this. What you can do is

  • On every carousel interaction do two things in either a cookie (could use a first party cookie) or local storage,
    • Add name of current page
    • Increment interaction count
  • On every page load check if interaction count is > 0,
    • Track interaction count and page name from cookie/local storage
    • Reset interaction count and page name in cookie/local storage

This will track the interaction of the last page of previous visit on first page of current visit. This way you get the complete counts the only caveat is that visit level allocation of interactions on last page of each visit will not be accurate.

Cheers!

 

 

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @MichaelJo13 ,

Assuming that you are tracking previousPageName and interactionCount on the subsequent page, you can send simply run the previousPageName report in CJA with interactionCount applied as a metric, this should give you the data that you are looking for.

Please note that way you have implemented, for carousel interactions which are not followed by a page view (user exits the site after carousel interactions on current page), you won't have tracking. If this is already not addressed then you should think about covering these scenarios for accurate reporting.

Cheers!

Avatar

Level 4

Thank you! As far as if a user leaves, we will lose tracking. I understand that. I just didn't want to send out a call every time a user clicks on the carousel, so I decided this was the least impactful way to approach this.  Do you have any ideas on how to better implement? I'm very open to any ideas. 

Avatar

Correct answer by
Community Advisor

Hi @MichaelJo13 ,

I personally haven't worked on such use case but if needed I'll explore the option to utilize either cookies or local storage to achieve this. What you can do is

  • On every carousel interaction do two things in either a cookie (could use a first party cookie) or local storage,
    • Add name of current page
    • Increment interaction count
  • On every page load check if interaction count is > 0,
    • Track interaction count and page name from cookie/local storage
    • Reset interaction count and page name in cookie/local storage

This will track the interaction of the last page of previous visit on first page of current visit. This way you get the complete counts the only caveat is that visit level allocation of interactions on last page of each visit will not be accurate.

Cheers!

 

 

Avatar

Administrator

@MichaelJo13 Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni