Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Allocation evar to track pagename in a click event

Avatar

Level 3

Hi to all

I need to track a page when a click event was triggered.

I read online that to do this I have to register an evar (or a prop) in the same call of the click event.

My question is about allocation:
If I put allocation as a visit I think it will be an error because:
- a user enters on the site
- clicks a button and I trigger the event1 with an evar with the home page url
- the user changes page and sees a product page, the evar populate with another url without a click event
- the user exit from the site

if I do an analysis of this situation, and I do a breakdown of an event1 for pages I see two pages: the home page an the product page, right?

I can solve it change the allocation from visit to hit, correct?

 - click a button and I trigger the event1 with an evar with the home page url

 - the user change page and see a product page, the evar populate with another url

 - the user exit from the site

 

if I analysis this situation, and i do a breadown of a event1 for pages I see two pages: the home page an the product page, right?

 

I can solve it change the allotation from visit to hit, corret?

1 Accepted Solution

Avatar

Correct answer by
Level 6

@francescop47742Yes, your understanding is correct. Changing the eVar allocation to the Hit level will give you the expected results. For example, let's say a visitor lands on the Homepage & you fire event1. Now, if the user navigate to the Product page in the reporting you will only see event1 instance against Homepage if you set the eVar allocation to Hit.

Hope this helps.

Regards,

Abhinav

View solution in original post

4 Replies

Avatar

Employee

Changing the allocation of the evar to Hit would indeed give you the desired results.

Avatar

Level 8

You want to track the page when an event click was triggered.

 

But, you are going to land on the product page without an event click, I think If you go and see the reports either you will see the "unspecified" keyword or only see the homepage, because to track landing page you need to perform click event. But here it is not happening 

 

If you want to generate a report based on page loading functionalities which means on the page load you need to track your evar ( you need to create page load event ) then with hit's you can achieve expected functionality.

 

Avatar

Level 3

Hi and thk for reply,

 

The evar was trigger in data layer every page load, I register hit also in the click event so i think i don't see "unspecified" but the page name.

 

Right?

 

 

Avatar

Correct answer by
Level 6

@francescop47742Yes, your understanding is correct. Changing the eVar allocation to the Hit level will give you the expected results. For example, let's say a visitor lands on the Homepage & you fire event1. Now, if the user navigate to the Product page in the reporting you will only see event1 instance against Homepage if you set the eVar allocation to Hit.

Hope this helps.

Regards,

Abhinav