To make goal tracking works properly, you'll have to make sure that your "Wisepops setup code" tag is fired before the "goal" tag.
To do so, open the "setup code" tag in Google Tag Manager, click "Advanced settings" and set the priority of the "setup code" tag to 1:
In this tutorial, we'll assume you have a confirmation page associated with your goal.
If you don't, please contact us, we'll suggest a different method.
Log in to your GTM account.
In the left menu, click "Triggers" and then "New".
Configure your trigger:
Type: Dom Ready
Fire on: Some DOM Ready Events
Page URL: input your confirmation page
Choose an explicit name for your trigger
In the left menu, select "Tags" and click "New"
In tag configuration, select "Custom HTML"
In the HTML field, paste the following script and customize it:
<script>wisepops("goal", [goalName], [goalValue]);</script>
[goalValue] should either be replaced by variables that makes sens to you, or omitted. You can refer to the Goal tracking documentation to learn more about them.
This is what it looks like in our case (note that I don't want to assign a value for goal completions):
In triggering, select the trigger you just created.
Save and name your new tag.
Preview the changes to make sure the tag is triggered on your confirmation page.
When you're done, hit "PUBLISH".