You 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,
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:
INFO: We increment the count for a custom goal each time
options.emitCustomGoal() is emitted. To ensure statistical accuracy, for each user, we only count once per iteration, when reporting progress against experience goals.
INFO: Custom goals are saved in the BigQuery table
options.emitCustomGoal ('add-to-bag:click') // An add to bag event from the PDP