Developer forum

Forum » Development » Funnel tracking in cartflow

Funnel tracking in cartflow

Morten Fink Eriksen
Reply

Hey

 

I have created a funnel which includes 5 steps, but i can't seem to get it tracked in analytics.

 

I have placed the call in two separate pageview calls, the normal "_gaq.push(['_trackPageview']);" and then i have some hidden input fields on my form for each step that defines a value. If the field exists i call the second pageview, but this time as a virtual pageview " _gaq.push(['_trackPageview'], document.getElementById("GaOrderStep").value);".

 

At first i had an "if/else" clause in the head that called the correct pageview depending on if "GaOrderStep" was available, but this gave an error since "GaOrderStep" didn't seem to be defined so early in the DOM. I then moved the virtual pageview call to the bottom to ensure that the "GaOrderStep" value was available. Now there was no error, but im still not getting anything tracked for the funnel in GA.

 

Is there something i might be missing or have done incorrectly?


Replies

 
Kim Sørensen
Reply
This post has been marked as an answer

Hi Morten.

 

Your 2nd parameter is placed outside the object array, change your script to something like this:

_gaq.push(['_trackPageview', document.getElementById("GaOrderStep").value]);

//KimS

Votes for this answer: 1
 
Morten Fink Eriksen
Reply

Doh! how did i not see that? think i been staring at it blindly for to long :)

 

Anyways.. thank you very much Kim :)

 

You must be logged in to post in the forum