1.1.0 • Published 2 years ago

web-vitals-google-analytics-shopify v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Core Web Vitals in Google Analytics for Shopify

This script makes it incredibly simple to start tracking Shopify Core Web Vitals and other web performance metrics in Google Analytics!

Simply add this script to your theme and load it roughly above the closing </body> tag like so:

<script
    src="//cdn.jsdelivr.net/npm/web-vitals-google-analytics-shopify/dist/web-vitals-google-analytics-shopify.min.js"
    data-shopify-template="{{ template }}" defer></script>

Learn more about how to use this script and how to optimize your site from this blog post about it here:

Track Core Web Vitals in Google Analytics with a single line of code

Data Attributes

The following data attributes can be used with the script:

AttributeDescription
data-shopify-templateSets the Shopify template used (this will show up in the event label for Universal Analytics)
data-event-action-prefixSets the prefix in front of the event. Defaults to Web Performance:
data-event-categoryOverrides the event category. Defaults to Web Performance
data-metric-decimals-placesSets the number of decimals places to report for metrics (unavailable for analytics.js GA). Defaults to 3

Made with ❤️ by the Render Better team

Render Better is on a mission to make the web faster and better! If you care about the open web and think site speed/web performance matters a lot, you are one of us. Learn more about us here!

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago