Home › Forums › WoodMart support forum › Integrate the Analytics Tracking Script
Integrate the Analytics Tracking Script
- This topic has 1 reply, 2 voices, and was last updated 3 years, 7 months ago by
Elise Noromit.
-
AuthorPosts
-
July 20, 2021 at 7:53 pm #307793
nkprlParticipantPlease tell me where in my woodmart i can add the following :
__________________________________________________________________________
Add the following snippet just before closing either the <head> or <body> section in all of your website template pages.Use the session:connect command to initialize the tracker object for your Account.
Tracking Code JS Snippet
<!– Add the Tracking Script and Connect to your Account –>
<script>
(function(a,b,c,d,e,f,g){a[‘SkroutzAnalyticsObject’]=e;a[e]= a[e] || function(){
(a[e].q = a[e].q || []).push(arguments);};f=b.createElement(c);f.async=true;
f.src=d;g=b.getElementsByTagName(c)[0];g.parentNode.insertBefore(f,g);
})(window,document,’script’,’https://analytics.skroutz.gr/analytics.min.js’,’skroutz_analytics’);skroutz_analytics(‘session’, ‘connect’, ‘SA-XXXX-YYYY’); // Connect your Account.
</script>
_________________________________________________________________________AND WHERE TO PUT THIS :
Step 2: Declare Ecommerce Data
Send your Order and Item data with the ecommerce commands. Ecommerce commands must be added at the final step of your checkout process after a user has successfully completed a purchase. Usually this is the “Thank You” or “Receipt” page.NOTE
You must first add the Tracking Code JS snippet, connect to your Account and then add the ecommerce commands.Tracking an Order
Use the ecommerce:addOrder command to track the order.<script>
skroutz_analytics(‘ecommerce’, ‘addOrder’, {
order_id: ‘123456’, // Order ID. Required.
revenue: ‘1315.25’, // Grand Total. Includes Tax and Shipping. Does not include payment costs.
shipping: ‘5.45’, // Total Shipping Cost. Does not include payment costs.
tax: ‘301.25’, // Total Tax.
paid_by: ‘example_paid_by’, // [Optional] Payment method type, e.g. bank_transfer.
paid_by_descr: ‘Example paid_by_descr’ // [Optional] Payment method description, e.g. Bank transfer.
});
</script>July 21, 2021 at 7:23 am #307848
Elise NoromitMemberHello,
Woocommerce customization, unfortunately, is not covered by our support. Please try to check the Woocommerce documentation on this issue.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register