This template is meant to be used in combination with Piano Analytics configuration template.
Add both templates from the Gallery to your Workspace.
Create a new Variable based on the Piano Analytics - Configuration template.
Fill your collection endpoint, site number, PA SDK source (up to date CDN file by default) and choose the default consent mode.
You can configure your Consent settings (documentation).
You can also add any other configuration available with our JS SDK (documentation).
Create a new Tag based on the Piano Analytics - Tagging template.
Make sure you use the previously created Variable as the Configuration for the Tag.
You can now choose the action you need this tag to achieve.
Fill the Event name and all the properties needed.
For each event to be sent, fill the Event name and give a variable with an object of properties to be sent.
The event properties object can either be a JS Variable, or a custom JS Variable.
The template offers a native GA eCommerce bridge, that will automatically transform GA eCommerce tagging to Piano Analytics events and properties.
Default events mapping is displayed directly in the tag configuration.
Default properties mapping is displayed directly in the tag configuration.
You can customize the properties mapping by adding new lines. Each line describes one mapping.
- The first field expects the Datalayer property name. You can prefix the value with
$$
to give a value instead of a property name. - The second field expects the Piano Analytics property to fill with the output.
You can set properties to subsequent events.
You can set the type of the property to either a fixed type, or to let the template automatically detect the type (using JSON.parse
JS method).
You can user this action to identify a logged in user.
You can set a new Consent mode if the end-user changes its preferences.
You can set a new Privacy mode if the end-user changes its preferences.
You can override our SDK management of the Visitor ID. This is however not recommended.