Initialization
After adding the script tag to your site, the SDK's initialization methods will be available through the global R2U object.
#
R2U.initThe init method initializes the SDK and connects to the R2U server and checks whether the customerId exists in our database.
#
R2U.sku.isActiveThe sku.isActive method indicates if a product is available on the Augmented Reality platform.
#
R2U.analytics.sendThe analytical method sends events to the R2U analytical platform, to identify the results of the integration of our SDK.
#
ParametersOther metrics and dimensions (such as SKU, customerId, operating system, etc.) are sent by default and do not need to be specified.
If analyticsParams.dataLayerIntegration
is set to true
, the following events are sent by default to the dataLayer:
product_page_view
: Triggers once per page whensku.isActive
is called, to mark product page viewsimpression
: Triggers at most once per page view where AR / 3D viewer is shownclick
: Measure all clicks on AR / 3D viewer
The documentation to send the events in dataLayer to Google Analytics is aqui