krixzoltan
Forum Replies Created
-
Found the problem!
My thankyou page didn’t have [woocommerce_thankyou] shortcode in it.
Thanks.
This purchase event is triggered on the previous (the checkout page) because I hardcoded it in the class-wc-enhanced-ecommerce-google-analytics-integration.php file. It is now triggered at the same time as step3, after you press the place order button.
However I still have hardcoded values here for everything, thats why the price and product don’t match your order.However on the thankyou page nothing is happening.
WordPress version: 3.9.2
Woocommerce: 2.0.20 (Cant update becuse the theme crashes)
Plugin list:
http://gyazo.com/d84def99923e68d102ddc37b7467a931Can you help me where the real purchase event is triggered in the souce code file. What event should trigger it? The thank you page? I can’t find it in the code because I don’t know this language.
Here is the code snippet for step3 and how I hardcoded it:
Now this shows up in the analytics soif you can’t help with my problem I’ll try to modify the hardcoded values for the real dynamic ones. But It would be better if the thank you page triggered the purchase event not step3.$inline_js = ‘t_track_clk=0; jQuery(document).on(“click”,”#place_order”,function(e){ if(t_track_clk===0){‘;
if ($step_2_on_proceed_to_pay) {
if (isset($code_step_2))
$inline_js .= $code_step_2;
}
$inline_js .= $code_step_3;/**
* Hardcodeing purchase event
*/
$codee = ‘ga(“ec:addProduct”, {“id”: “20962”,”name”: “Lite Triangle fotel”,”category”: “Fotel”,”price”: “15990”,”quantity”: “1”}); ga(“ec:setAction”,”purchase”, { “id”: “T12345″,”affiliation”: “Google Store – Online”,”revenue”: “37.39”,}); ga(“send”, “event”, “Enhanced-Ecommerce”,”load”, “order_confirmation”, {“nonInteraction”: 1}); ‘;$inline_js .= $codee;
/**
* End of hardcode
*/$inline_js .= “t_track_clk++; }});”;
Thanks for your help in advance.
I have the same problem on one of my sites.
Newest woocommerce and WP version.