A
A
andrey-st2016-06-03 15:07:17
Google Analytics
andrey-st, 2016-06-03 15:07:17

How to pass information to GA that has not yet appeared on the page (AJAX)?

Hello!
I can't find an answer to one question.
On the main page, there are 4 blocks with products that are loaded dynamically using AJAX. When you scroll to the bottom of the page, those blocks that fall into the monitor area are loaded. I connected Google Analytics Universal according to the documentation https://developers.google.com/analytics/devguides/... All data is correctly transferred to GA, but the bounce rate displays false data due to the fact that for each loading block with products I use ga('send', 'pageview');, that is, on the main page I send 5 ga('send', 'pageview'); - 4 blocks with products and 1 view of the main page!
I looked in the documentation for setting up the Analytics code, how to solve this problem. I came across documentationhttps://developers.google.com/analytics/devguides/... and https://developers.google.com/analytics/devguides/... but still couldn't solve the problem!
Now here is the question!
Tell me, please, how can I send information to GA about viewing promos and products that have not yet loaded?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MetaDone, 2016-06-04
@MetaDone

at the time of loading, update the url through history.api and then use what the link
https://developers.google.com/analytics/devguides/...
should work, i.e. load the page, assign the link to examle.com/products/page/2 and then send ga('send', 'pageview');

A
andrey-st, 2016-06-06
@andrey-st

at the time of loading ... and if the user went to the main page and clicked on the mainmenu, GA will not receive information about those blocks that did not appear, thus ga('send', 'pageview') may not work!
Found information about what can be somehow implemented using event push? What can you say about such a solution and how to apply it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question