Analytics
2K members online now
2K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Ecommerce chekout behavior missing step

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I've set up funnel traking using 

ga('ec:setAction', 'checkout', { 'step': X });

I traked the execution with the Chome app "Google Analytics Debugger" and all my 6 steps a triggered without error, but only the firs one works fine. The second one not all he time and the rest worked just once, despite multiple test with multiple computers.

Here are the corresponding code, tell me if I'm missing something :

Step 1:

$( document ).ready(function() {
ga('ec:addImpression', {
'id': ope_id,
'name': ope_lib,
'category': ope_idmetier
});
ga('ec:setAction', 'checkout', { 'step': 1, 'option': ec_option });
});

Step 2 :

$( document ).ready(function() {
ga('ec:addProduct', {
'id': ope_id,
'name': ope_lib,
'category': ope_idmetier,
'quantity': 1,
'price':pra_tarif
});
ga('ec:setAction', 'checkout', { 'step': 2 });
})

Step 3, 4 and 5:

{if isset($STEP)}
var gaStep = false;
{if $STEP == 0} //3 identification
gaStep=3;
{elseif $STEP == 1} //4 information
gaStep=4;
{elseif $STEP == 2} //5 validation
gaStep=5;
{/if}
if(gaStep !== false){
var ope_id = '{$OPERATION.ope_id}';
var ope_lib = '{$OPERATION.ope_lib|addslashes}';
var ope_idmetier = '{$OPERATION.ope_idmetier}';
var pra_tarif = '{$OPERATION.pra_tarif}';
{literal}
$( document ).ready(function() {
ga('ec:addProduct', {
'id': ope_id,
'name': ope_lib,
'category': ope_idmetier,
'quantity': 1,
'price':pra_tarif
});
ga('ec:setAction', 'checkout', { 'step': gaStep });
})
{/literal}
}
{/if}

Step 6 :

ga('ec:addProduct', {
'id': ope_id,
'name': ope_lib,
'category': ope_idmetier,
'quantity': 1,
'price': pra_tarif
});
ga('ec:setAction', 'checkout', {'step': 6, 'option': 'mangopay'});

 Step 7 :

$( document ).ready(function() {
ga('set', 'currencyCode', 'EUR');
ga('ec:addProduct', {
'id': ope_id,
'name': ope_lib,
'category': ope_idmetier,
'quantity': 1,
'price':pra_tarif
});
ga('ec:setAction', 'checkout', { 'step': 7 });
ga('ec:setAction', 'purchase', {
'id': mtr_id,
'revenue': mtr_amount,
'tax': '0',
'shipping': '0'
});
})

 

Thanks

1 Expert replyverified_user

Ecommerce chekout behavior missing step

Rising Star
# 2
Rising Star

Hey Romain,

 

I'm out of my league here in terms of coding but I don't see you using the send function " ga('ecommerce:send'); 

 

I will tag someone who has better knowledge of such matters, maybe they can help you out. @Nicky Y

Joshua, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’