Conversion tracking
There are multiple options to track conversions into Roivenue. We will cover three most common ones.
Last updated
Was this helpful?
There are multiple options to track conversions into Roivenue. We will cover three most common ones.
Last updated
Was this helpful?
Auto-capture
Trigger adjustment
Customizations of tracked events are not necessary.
Send event directly
One custom HTML tag and trigger
There is a need to adjust payload of conversion events. Giving you absolute freedom in the payload you send.
Translation tags
One custom HTML tag and trigger
When changes to otherwise captured properties are needed. Adding additional properties is not supported.
These approaches can be combined, but make sure not to double-count any conversions while doing so.
If you have followed the Main Implementation and want to track purchases from the e-commerce module, you must only ensure proper triggers for the main tracking tag. This typically requires adding a purchase event as a trigger for it.
Another option is to use the Roivenue global tracking object to capture events directly. This is handy for customizing the purchase event's fields or capturing custom conversions. Before implementing this logic, remove purchase events from the automatically collected events in the roivenue.tracking.config variable.
This is what a script for tracking this event can look like:
Ensuring the main tracking script is initialized before the custom event is sent is essential.
We can use a setup tag in tag sequencing or adjust the trigger. This is how a tag sequence option would look like:
In a situation when you want to track a conversion and you already have details about the conversion in dataLayer (which may be already used by some other GTM tag) but the data structure of the conversion does not match either the Google Ecommerce or Roivenue Measurement standard, you can create a new tag that will convert the data structure or change the logic how the event is triggered. To implement this you need to:
Make sure the event type already in dataLayer is not listed in event_types in roivenue.tracking.config variable. This is necessary to avoid duplicate events.
create a new tag that will be triggered by the event you would like to track. The tag will read the event data, translate it into roivenue format and then push a new event of type “roivenue_measurement_event” into dataLayer.
roivenue measurement tag is triggered by this event and captures it with its payload. The field type in the payload will work as the event type of the captured event.
An example of the tag is below.
The tag is being triggered by a standard conversion trigger. The tag reads the transaction details from a dataLayer variable named transactionData. Then it pushes a new event roivenue_measurement_event. This would be equivalent of calling this:
dataLayer.push({
Here is another example of a conversion tag. Its code does not use variables but use directly contents of dataLayer. It searches for the last event of type “purchase” in dataLayer and then translates and pushes a new event.
The event fields needed for conversion processing are described in the Tracking Purchases and Other Conversions section of the main implementation guide.