Adding Action Conversion Pixels To Marketo Forms
You can set goals to be triggered when the visitor reaches a URL (as a destination goal) or by action conversion. In case the goal that you want to track doesn’t have a URL (e.g., a “Thank you” page), you will need to add a pixel to the conversion button or “Thank you” Iframe.
In this post, we will explain how to add an action conversion pixel to a Marketo form or Iframe.
1. Go to the Add Conversion Goal tab and choose Goal Type: Action conversion
2. After clicking on the ‘Save’ button, you will see the pixel for this goal:
4. Edit the code of the Marketo script in the following window to include the pixel that you have copied:
4. Here is how the js code should appear after you add the pixel to the Marketo form. Add your data instead of the orange text that appears below:
<script src="//app-sj16.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_ID"></form>
MktoForms2.loadForm("//app-sjst.marketo.com", "000-UHP-000", ID, function(form) {
form.onSuccess(function(values, followUpUrl) {
form.getFormElem().hide();
var trd_pixel = document.createElement("img");
trd_pixel.setAttribute('src', 'https://prod.trendemon.com/apis/loadflame/pixel?user_id=...');
return false;
});
});
Once you have changed the js code, we will be able to track visitors reaching the specified goal.