Nvzn Easy ARt Virtual Previews
Analytics
Introduction
Tracking user engagement with the Nvzn Augmented Reality (AR) feature on your Shopify store helps measure its impact on conversions and interactions.
This guide outlines how to set up Google Analytics 4 (GA4) event tracking for the AR button in your Shopify store.​
1. Link Your GA4 Account to Your Shopify Store
If you haven’t done so already, first, ensure that your GA4 account is linked to your Shopify store. This can be done using the official Google & YouTube sales channel app in Shopify.​
-
From your Shopify admin, go to Apps > Google & YouTube.
-
Follow the prompts to connect your GA4 account.
-
For more information, refer to the Shopify documentation: Setting up Google Analytics 4
​​
2. Add GA4 Event Tracking to Your Theme
After linking GA4 to your Shopify store, use the Theme Editor to modify your page template to include the integration code.
​
-
In your Shopify admin, navigate to Online Store > Themes.
-
Select the theme you're using for the store and click Customize.
-
Go to the Default Product template or whichever template has the Nvzn Easy ARt button installed.
-
From the left-hand panel, add a new HTML App Block (most Themes will have either a Custom HTML or Custom Liquid block).
-
It doesn’t matter where you position the block, but we suggest adding it right under the Nvzn AR Button.​
-
​Select the App block, and paste the following code snippet into the HTML text area:
<!--
NVZN GA4 TRACKING
-->
<script>
document.addEventListener('click', function (event) {
const button = event.target.closest('#ar-btn');
if (button) {
if (typeof gtag === 'function') {
gtag('event', 'view_ar', {
event_category: 'Engagement',
event_label: 'AR Button Click',
});
} else {
console.warn('Google Analytics (gtag) is not defined. Event not tracked.');
}
}
});
</script>
-
Save the changes to the Theme
3. Verifying the Integration
Once the App Block has been added to the Theme, all that remains is to check that the integration is working.
​
-
Visit your product page and interact with the AR button a few times.
-
Check in Google Analytics to ensure the data is being received:
-
Go to Google Analytics
-
Go to the Reports > Engagement > Events section and look for the list of Event Names
-
Filter this list for a “view_ar” event
-
Note that it can take up to 24 hours for events to appear in this report.
-
Conclusion
You can now track AR views in GA4 and build reports to measure the impact of AR engagement.
​
If you have any questions, send us a message via the Support Request form.
​​​
© 2025 Nvzn Augmented Reality Corp.