How To Fire An Adwords Conversion Pixel Using An Action?

Is it possible to make a Bubble Plugin that fires off a Google Adwords conversion script??

Keep in mind that the script normally is placed on the front end of the website.

Is this JS that you need to run? If so, you could use the plugin Toolbox to enable you to run custom JS as part of a workflow.

Yes, you can use an action in a plugin. It’ll run on the client.

Script is a javascript that is supposed to go on the ‘order confirmation page’ visible on the front end.

Where do I go to create a plugin with Bubble? I will give it a shot.

I hope that we can trigger a conversion based on anything and pass values through to Google Adwords dynamically.

I’d recommend you use the Toolbox plugin and then have it run this JS on page load for the order confirmation page. Seems like you could implement this in <5 mins instead of having to write your own plugin. Just my 2 cents.

I agree.

It should not fire on page load though. It needs to fire as an action. Is it possible in this fashion?

Yes. You just use the action “Run Javascript” and then input the Javascript that you want run. You can use this in any action.

1 Like

To do so, you’ll need to use the Toolbox plugin.

1 Like

I’m trying to use the adwords conversion script inside of the toolbox but it’s not firing on action… it is not registering inside of Google Adwords.

What is the issue?

the <div> is an html element (so not javascript). That code, as is, looks like it’s meant to physically reside on the page instead of being triggered by, say, a workflow.

Any way to get a version of the code that only has javascript? If so, try that.

If not, then perhaps try just putting that code in an HTML element on the page and have it shown on page load (could be 1px by 1px so it’s not really visible to the user). And, see if that works.

Is there some reason why the tracking pixel won’t fire when an Action makes the html element become visible?

I can’t have it fire on page load. I need it to fire after a certain action is taken by the user, but when i ‘show’ the html element it doesn’t register the conversion correctly inside of Google AdWords.

I’m pretty sure cannot use the function make visible (an HTML snippet won’t work like that, not in my experience). Just make the HTML 1 pixel by 1 pixel but leave it visible. use the toolbox to pass the parameter when needed as Scott mentioned


Okay. I understand. Have some theories on what’s going on. I suspect the solution, then, is to run this script in Toolbox (as you have tried). One change though - remove all of the code starting with <noscript> and everything below that.

This way, it’s just javascript. Toolbox should run it then. And, that bottom part seems to be purely visual (e.g., HTML) which you don’t need since you’re triggering the JS yourself and not displaying the HTML on the front-end.

Make sense?

1 Like

That makes sense and I’ll try that inside the toolbox.

There is also a second method of triggering the conversion.

  1. place a JS on the page
  2. place an ‘onclick’ statement at the element level to trigger the conversion.

It would be excellent if we could add an onclick value to a button element (or an action) @emmanuel


You can do the onclick part with bubble. Simply set a workflow to run when someone clicks that button and have the action run that JS. Then take out the onclick part of the code because Bubble’s triggering it onclick and you don’t need the code to set that up.

1 Like

You can build a plugin with some custom code for an action. I mentioned that earlier in the thread

That doesn’t seem to work still for some reason.

I’ve used the on-click google adwords conversion tracking script (removed the onclick part) and placed it inside of a Toolbox action.

Is there something I’m missing to get this to work?

Is there any way we can get this working some how using the toolbox?

You can use the PlugBubble plugin. In page load run a custom code block with your code in it making sure to do away with script tags. This will only fire the script when the action is run and does not stay hidden on the page because its an action without an element.

1 Like

Do i need to remove the when using the toolbox plugin and firing this script on action?