Analytics Conversion Funnel: Ajax & Google Tag Manager 

Tutorial: Set up Universal Analytics Funnel for Ajax websites using Google Tag Manager

Analytics Conversion Funnel
Ralph Grundmann · Published on 23 March 2016

This article is from our archive and reflects the situation as of March 2016.

From a user’s and web developer’s perspective, the use of Ajax brings many advantages. Only the necessary data travels between the server and the browser, which speeds up the page and reduces data transfer for the website owner.

You do not necessarily have to use a virtualPageTitle. However, it is advisable, as the URL and Title are displayed as primary dimensions in Analytics!

Naming of the funnel steps

1

1. Basket

virtualPageURL: /step1-basket
virtualPageTitle: Checkout Step 1 - Basket

2

2. Address entry

virtualPageURL: /step2-address
virtualPageTitle: Checkout Step 2 - Address

3

3. Payment information

virtualPageURL: /step3-payment
virtualPageTitle: Checkout Step 3 - Payment

4

4. Order review and confirmation

virtualPageURL: /step4-confirmation
virtualPageTitle: Checkout Step 4 - Confirmation

5

5. Thank you page

virtualPageURL: /step5-thankyou
virtualPageTitle: Checkout Step 5 - Thank you

The JavaScript you need to populate the data layer at each step

Define DataLayers

1

1. dataLayer.push command for the basket

1
2
3
4
5
dataLayer.push({
'event':'checkout',
'virtualPageURL':'/step1-basket',
'virtualPageTitle':'Checkout Step 1 - Basket'
});
2

2. dataLayer.push command for address input

1
2
3
4
5
dataLayer.push({
'event':'checkout',
'virtualPageURL':'/step2-address',
'virtualPageTitle':'Checkout Step 2 - Address'
});
3

3. dataLayer.push command for the payment data

1
2
3
4
5
dataLayer.push({
'event':'checkout',
'virtualPageURL':'/step3-payment',
'virtualPageTitle':'Checkout Step 3 - Payment'
});
4

4. dataLayer.push command for the order review and confirmation

1
2
3
4
5
dataLayer.push({
'event':'checkout',
'virtualPageURL':'/step4-confirmation',
'virtualPageTitle':'Checkout Step 4 - Confirmation'
});
5

5. dataLayer.push command for the thank you page

1
2
3
4
5
dataLayer.push({
'event':'checkout',
'virtualPageURL':'/step5-thankyou',
'virtualPageTitle':'Checkout Step 5 - Thank you'
});

Do you have questions about Google Tag Manager and Ajax pages?

If you have questions, problems, or need a Google Tag Manager / Google Analytics implementation for Ajax pages or training, feel free to contact us!

Request a consultation
SISTRIX-zertifizierte Agentur
4.9
Based on 32 reviews

Reviews from our Google Business Profile. We check every review against our client projects.