How do I trigger a goal conversion when a user clicks a link?
The recommended method for tracking goal conversions is to use Goal Triggers that can be configured when creating a goal, as explained in the goal tracking User Guide.
However, in some cases, you won't be able to track a goal conversion using the page URL (for example, when a link opens the page in an iFrame). In this case, we can use the MVMCloud Analytics Tag Manager to track meta conversion for specific links or for links that contain specific parameters or strings.
Let's look at an example link that a visitor might click: example.com/meu-objetivo
(This is just an example, your URL may
contain a simple path, as shown here, or a more complex one, such as example.com/meu-objetivo?sucesso=1
)
- Create a goal in MVMCloud Analytics and write down its ID;
- Create a trigger with the following settings; Click all links as the trigger type with the name being, for example, Trigger on registration link.
Then add the following to the trigger conditions:
Clicks > Click Destination URL > Contains my-goal. (if you have other URLs that contain this string, you may need to add additional conditions to trigger only those specific URLs, like a regular expression/regex) Note that this trigger will only fire if all conditions specified here are met, so you cannot add each unique call-to-action link as a trigger.
Optional: If you want this goal to only trigger from a specific page on your site, you can add an additional trigger (say, for example, if we want to track this goal conversion only from a specific section of our site, like the "store").
3. Create a new tag MVMCloud Analytics with the name Trigger in the registration link ;
4. Test the new Tag and Trigger using preview/debug mode on the page you want to use it to ensure the target is being tracked correctly;
5. Once tested, you can publish the container to the Live version of the container.