Giter Club home page Giter Club logo

shopify-ga4-kit's Introduction

Shopify GA4 Kit

A complete kit to integrate Shopify with GA4. Purchase & product view data layers, pre-built Google Tag Manager container, in-depth tutorials.

Analyzify Shopify Data Layers v2.1 change history (open-source)

  1. Code improved, and minor issues related to the item object were fixed.
  2. User type, content type, customer id, last order date, total order quantity, total expenditure, and customer tag fields were added with the sh_info event.
  3. New product variables were added; productSku, productType, productVariantId, productVariantTitle and currency.
  4. New transaction variables were added; orderItemsSku, orderItemsvariantId, orderItemsvariantTitle, orderItemsCategory, orderItemsBrand, orderItemsType
  5. Currency rate and static order amount variables were added for multi-currency stores; totalValueStatic, currencyRate.
  6. Depending on the Shopify Checkout process, if the OrderID field was empty, the transaction_id field was adjusted to transmit the Checkout ID.
  7. Item data (line_item) was modified with the checkout object.

Download updated Google Tag Manager container

Visit https://analyzify.com/shopify-ga4-kit and request the latest Google Tag Manager container. You'll receive an email from us soon.

shopify-ga4-kit's People

Contributors

ceaksan avatar ekuplu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

shopify-ga4-kit's Issues

download not work

the form on this page is broken
https://analyzify.app/shopify-ga4-kit

if you are going to "give" it then give it.
Place it here on GitHub

This experience has made me "not want" to consider the paid shopify app (nor recommend it to clients)
Lets examine why:
1- The download page does not work (used 2 emails, gmail, and checked spam folder, waited 20 min)
2- even if it did work, you are still "trying" to get an email (we all know why)
3- if you want emails THAT badly, whats to stop your app from sucking them out of shopify?
4- you clearly know how GIThub works- why then is the JSON container "not" on this page?
5- maybe the company is incompetent, or worse... "shady"

QED
All really bad experiences from a UX/brand perspective

Why?
Well...
1- if the company can not set up SPF and DKIM records to properly deliver email, why should I trust this?
2- as soon as I type my email into that field I know its been harvested
3- so... do they REALLY believe in OpenSource?

QED
Likely not...

Uncaught Exception in datalayer-product.js

I have implemented the ga4-kit into Shopify but was seeing some strange behaviour where the analyzify_productDetail event was not firing on certain product pages.

I've realised that it was an issue with quotes " being used in our Shopify variants.

Screenshot 2024-05-13 105652

I've managed to correct the issue by updating line 21 in datalayer-product.js from

var productVariantTitle = "{{ product.selected_variant.title | default: product.variants[0].title }}";
to
var productVariantTitle = {{ product.selected_variant.title | json | default: product.variants[0].title | json }};

and the event now successfully triggers on all my product pages.

Not sure if that is the best way to fix it, but it's working

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.