Integration Google Analytics 4 (GA4) HikaShop eCommerce Tracking for HikaShop without a Plugin
To track HikaShop eCommerce data in Google Analytics 4 using Google Tag Manager (GTM) without using modules or plugins, you can set up custom events and triggers in GTM.
First, create custom events in GTM for each eCommerce action you want to track (e.g. add to cart, purchase, etc.) and define the relevant parameters for each event (e.g. product ID, quantity, price, etc.).
Then, use the HikaShop code to trigger the custom events when the corresponding eCommerce action occurs. You can do this by adding custom data attributes to the HTML elements that trigger the eCommerce actions (e.g. add to cart button) and using these attributes to fire the appropriate GTM event.
Next, create triggers in GTM to listen for the custom data attributes and fire the corresponding custom events. For example, you might create a trigger that fires the “Add to Cart” custom event when the “data-hikashop-product-id” attribute is present on the “Add to Cart” button.
Finally, set up a GA4 tag in GTM to send the custom events to GA4. You can use the “Event” parameter to map the GTM custom event names to the GA4 event names and the “Parameters” parameter to map the GTM custom event parameters to the corresponding GA4 event parameters.
This approach requires some technical expertise but allows for more flexibility and customization than using a pre-built HikaShop module or plugin for GA4 tracking.
To track HikaShop eCommerce data in Google Analytics 4 (GA4) using a data layer and Google Tag Manager (GTM) without using a HikaShop module, you can follow these steps:
Set up a data layer in HikaShop that captures eCommerce data such as product IDs, prices, and quantities. The data layer should be formatted according to GTM conventions, with an “ecommerce” object containing “purchase”, “add_to_cart”, and other relevant actions.
Create a GTM tag to track eCommerce data in GA4. Use the “Event” parameter to specify the GTM event that corresponds to the HikaShop eCommerce action (e.g. “addToCart” or “purchase”). Use the “Parameters” parameter to map the relevant data layer variables to the corresponding GA4 event parameters (e.g. “items” for product data).
Create a GTM trigger to fire the GA4 tag when the HikaShop eCommerce action occurs. Use a custom event trigger that listens for the appropriate data layer variables (e.g. “ecommerce.action” equals “addToCart”).
Test the GA4 tag by triggering an eCommerce action in HikaShop and verifying that the data is correctly passed to GA4.
Disclaimer: Google tag manager belongs to Google property
For Contact: email@example.com
I am available for Hire on Freelancer: Freelancer.com
I am available for Hire on Upwork: Upwork.com
I am available for Hire on Peopleperhour: Peopleperhour.com
I am available for Hire on Guru: Guru.com