Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Allocation evar to track pagename in a click event

francescop47742
Level 3
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
kainth
Correct answer by
Level 5
Level 5

@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
khurshid
Level 2
Level 2

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

raj_mandalapu
Community Advisor
Community Advisor

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.

 

francescop47742
Level 3
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?

 

 

kainth
Correct answer by
Level 5
Level 5

@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