Adding Action conversion pixel in Marketo forms

When settings up goals, you can define goals by reaching a url (Destination Goal) or by action conversion. In case the goal that you want to track doesn’t have a url. (i.e. “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 Goals tab and create New Goal. Choose Goal Type: Action Conversion



2. After clicking on the ‘Save’ button. You will see the pixel for this goal.


3. Copy the src of the pixel

4.   This is the Marketo script that you use today, you need to take this code and edit it with the pixel that is generated from the action conversion pixel.


4. Here is how the js code needs to be after adding the pixel to the Marketo form. Add your data instead of the orange text. Once it’s placed together on the page, we will be able to track visitors reaching the goal

<script src="//"></script>
<form id="mktoForm_ID"></form>
MktoForms2.loadForm("//", "000-UHP-000", ID, function(form) {
  form.onSuccess(function(values, followUpUrl) {
    var trd_pixel = document.createElement("img");
    trd_pixel.setAttribute('src', ''); 
    return false;