Analytics
2.1K members online now
2.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Dynamic Webshop, Virtual Pageviews & Funnel issue

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi there,

 

I've recently set up a piece of code on my website to help track conversions on customers purchasing my product.

The site uses a webshop with randomized URLs through the cart steps - hence I got a tip on setting up Virtual Pageviews to pass the page Title in each step, as this changes through the process.

When testing in e.g. real time, I can see the '/cart 01', '/cart 02' pages etc. pop up as intended.

 

My goal setup

I've set up the goal as a funnel with the end page being equal to /cart 04 (the checkout page) and having /cart 01, /cart 02 and /cart 03 as funnel pages in that order (/cart 01 is mandatory).

 

My issue

 

The funnel seems to work when I test it on my "no filters" profile (I exclude my own views on our main profile).

However, on the main profile I can see that I've had 35 users "enter the funnel" and 35 drop out in step 1 - yet, in my historical page views I've seen no registering of '/cart 01' in the period where the users apparently entered the funnel (i.e. pressed "add to cart")

 

Question

Do you know why my funnel apparently registers entrants - yet my pageviews do not track any views of /cart 01 for the same period?

 

Picture of funnel

http://postimg.org/image/4yahvzw35/

 

The script code

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-64326891-1', 'auto');

var title = document.getElementsByTagName("title")[0].innerHTML;

if (title == "Cart: Step 01") {
ga('set', 'page', '/cart 01');
}

if (title == "Cart: Step 02") {
ga('set', 'page', '/cart 02');
}

if (title == "Cart: Step 03") {
ga('set', 'page', '/cart 03');
}

if (title == "Cart: Step 04") {
ga('set', 'page', '/cart 04');
}

if (title == "Order Confirmation") {
ga('set', 'page', '/OrderConfirmation');
}

ga('send', 'pageview');

var trackOutboundLink = function(url) {
ga('send', 'event', 'outbound', 'click', url, {'hitCallback':
function () {
document.location = url;
}
});
}
</script>


<script>
var title = document.getElementsByTagName("title")[0].innerHTML;

if (title == "Cart: Step 01") {
ga('send', 'pageview', '/cart 01');
}

if (title == "Cart: Step 02") {
ga('send', 'pageview', '/cart 02');
}

if (title == "Cart: Step 03") {
ga('send', 'pageview', '/cart 03');
}

if (title == "Cart: Step 04") {
ga('send', 'pageview', '/cart 04');
}

if (title == "Order Confirmation") {
ga('send', 'pageview', '/OrderConfirmation');
}
</script>

 

 

Thank you for your help!

 

Martin

Re: Dynamic Webshop, Virtual Pageviews & Funnel issue

Follower ✭ ☆ ☆
# 2
Follower ✭ ☆ ☆

Just as an update, I tried to also add in the "Home" page (where the Add to Cart button is) as the first step in the funnel.

The "No Filter" funnel looks as follows: http://postimg.org/image/iwq0p9art/

 

Further, here is a pic of my goal setup: http://postimg.org/image/mwtmpf0wt/

 

The picture shows another strange occurence: In each of the funnel steps, "exits" occur also when the actual occurence seems to be that the user (in this case myself) moves to the next site in the funnel (e.g. from "Home" to "Cart 01", where 8 exit to /cart 01). Any idea what is happening here?