Push goals


Just go to Goals and Add new Goal and choose Push Goal. Then copy the ”pushGoal” function from the input field below Goal Setup. This function needs to be added to your website (not in the Symplify editor) when the Goal should register. See how to set this up below;

You must make sure that the Symplify script has loaded fully before you push a goal. The easiest way to make sure of this is to add an if statement that fires the function if Symplify has loaded and if not adds an event listener that waits for Symplify to load and then fires the function. See example code below;

if(sitegainer) {
   sitegainer.pushGoal("{You goal id}");
} else {
  document.addEventListener("sitegainer-loaded", function(e) {
    sitegainer.pushGoal("{You goal id}");


Push goals can be very useful in situations where some interaction is veryfied in backend and the result isn't necessarly visible in the frontend code. Examples of that could be form submits with the need to target submits with specific values, newsletter registrations etc.



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