Jump to content

ajax and google analyticshey


traxion

Recommended Posts

hey alli've got a website with build with ajax, everything works fine but the Google Analytics dont lognow i've got a temp solution to put the Google Analytics in de index.php, but this file is only load the first timebecause i use ajax i cant use any javascript on the page, so just putting the code on all page doesn't worksis there a work around to keep stats of the pages load with ajax, with Google Analytics or anther stats website???thnx for the info

Link to comment
Share on other sites

you can use the urchinTracker method of Google AnalyticsJust attach it to the event that triggers your ajax.

<button value="Do Some AJAX" onclick="doSomeAjax();urchinTracker('url/to/log');"/>

This will let you log urls even when it is being updated by ajax.

Link to comment
Share on other sites

the link is right now

<a href="java script:scroll(0,0)" onclick="verstuur('internet-email.php')">Postvak</a>

href is to get the page on the top of the pageonclick i call the function of the ajaxso it should be something lijke

<a href="java script:scroll(0,0)" onclick="verstuur('internet-email.php');urchinTracker('mail.php');">Postvak</a>

am i correct?i get the error, but im looking on google and found a site that looks good for what i want.. i will go check that out

urchinTracker is not defined

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...