Php google analytics redirect question with 'header'

Hay All.

I am currently working on a "checkout" system, the actual payment, etc., is carried out by a third party.

When the user checks the use of the form, he sends all the GET data to some other site, allows you to call this "checkout.com". So the query string is: "checkout.com?var=1&var2=2".

What I want to do is put a page between my form and this call on checkout.com, I want to be able to register this using Google Analytics.

Can I use the title ("location: checkout.com") "? Or will javascript not be called to register the page?

Do I need to use HTML redirection? or javascript redirection? or will php redriect work correctly?

thanks

+3
source share
2 answers

Otherwise, you can create Google Analytics event tracking using the link that the user clicks / the form that the user fills in order to track the submission / click of the form.

See http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html

+2
source

If you use browser redirection, it will not execute javascript, you will need to use window.location = 'checkout.com';and call google script analytics before redirecting.

those.

pageTracker._trackPageview('url of this page');
window.location = 'checkout.com';

+1

Source: https://habr.com/ru/post/1721973/


All Articles