Tracking code for conversions

If you aren't able to set a goal for conversions with any of our standard facts (through URL matching, Page content etc.) you can add a Push Goal to do this.

A Push Goal needs to be implemented on your website to register a conversion. In this example, we set up a Push goal for final conversions (Order). The Push goal in this case is implemented and executed on the 'Thank you/Order confirmation'-page (i.e the page that the visitor reaches when fulfilling a final conversion on your website). The important thing here is that this code only should be executed when an final conversion is fully completed.

 

mceclip1.png

To add a Push goal click on Goals down in the Editor bar in your project and then click Add new goal. Then set a name and an optional description for this Goal. In the example above we set the name to Order and leave the description blank. Click Create goal to create this and go to settings for this goal.

 

mceclip3.png

Now click Add to show all the statements and then click Push goal to add this statement.

 

mceclip4.png

A new Push goal has been added to you Goal. This contains the generated callback that you need to execute to register a conversion for this goal. Remember to click Save in the upper right corner to save this statement.

 

mceclip5.png

To be able to re-use this Goal in upcoming projects you need to save this Goal as a template. Do this by clicking the three dots to the right of the save button and then click Save as template. You now get the option to set different name/description for this template. If everything looks fine you can just click Save and this will be saved as a template that you can reuse in other projects.

 

If you know that you always wish to have this goal for all your coming projects you can set this template as a standard goal. This will automatically add this goal to all new projects on create.

 

To make sure that the implementation script has loaded before you execute the callback for the push goal you can check if the symplify object has loaded with the below code. Enter you Push goal ID from the Goal setup above instead of "Push goal ID".

<script> 
/* Tracks final conversion */
if(typeof symplify !== 'undefined') { symplify.pushGoal(Push_goal_ID); } else { document.addEventListener("symplify-loaded", function() { symplify.pushGoal(Push_goal_ID); }); } </script>

 

 

mceclip0.png

This goal will later show up in the statistics with the name you entered, in this example "Order", when data has been collected.

Was this article helpful?
0 out of 0 found this helpful