Skip to main content

Analytics

Analytics Setup

The R2U Augmented Reality SDK by default generates usage events, such as impressions and clicks on 3D viewers.

The necessary configuration steps are described bellow such that the data is available in Google Analytics.

1. Google Tag Manager setup

  • Download the setup file GTM-R2U-setup.json

  • In the Admin tab, click in Import container

    GTM-setup-1

  • Choose the configuration file (GTM-R2U-setup.json)

  • In Choose workspace, select Existing and use the workspace with the Google Analytics variable

  • Select Merge and confirm

    GTM-setup-2

  • Configure the tag UA - R2U events to use the Google Analytics variable

    GTM-setup-3

  • Configure the tag GA4 - R2U events with the GA4 Measurement ID to send the events

    GTM-setup-4

  • Publish the changes

2. Google Analytics setup

  • Import the R2U segments and report via this link and apply to the view with the website data

Send analytics to R2U platform

The analytical method sends events to the R2U analytical platform, to identify the results of the integration of our SDK.

const addToCartButton = document.getElementById('add-to-cart')
addToCartButton.addEventListener('click', () =>
R2U.analytics.send({
event: 'add_to_cart',
data: { price: 30 }
})
)