Emit custom goals when building experiences
Emit custom goals when building experiences
This is for:
DeveloperYou can use the QP emitCustomGoal
function within an experience to emit custom experience goals.
The function uses the QP API and takes a single parameter, id
:
options.emitCustomGoal(id)
The function is bound to the options object of the variation or triggers and can be called as shown above. Any events sent through this are bound to the experience, and can therefore only be tracked by the experience they are sent from.
The function takes a single parameter:
-
id
: This is the name of the event and can be any string value. It is this value that needs to be added to the Event action for it to be tracked as an experience goal:
Note
We increment the count for a custom goal each time |
Note
Custom goals are saved in the BigQuery table |
Example:
options.emitCustomGoal ('add-to-bag:click') // An add to bag event from the PDP