Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google AdWords: remove iframe added by tracking conversion code

I want to add Google AdWords to my site but the script I'm supposed to add creates an iframe in the dom. This iframe is visible and moves down 13px (its height) all my page.

Is there any way to avoid this? If not, can I hide it without affecting Google AdWords functionality? (It is an empty iframe).

like image 768
Diego Avatar asked Aug 13 '12 17:08

Diego


People also ask

Does Google Ads automatically track conversions?

Also, app downloads and in-app purchases from Google Play, and local actions will automatically be recorded as conversions, and no tracking code is needed.

How do I get Google Adwords conversion tracking?

Before you can add a conversion tracking tag to your website, you'll need to do the following: Create a conversion action in your Google Ads account. To create a conversion action and get your conversion tag, follow the instructions in set up conversion tracking for your website. Have the ability to edit your website.


1 Answers

There's an easy fix that doesn't affect the functionality of the code snippet. I've done this with no adverse effects. Just place the script within a hidden div like below and it should do the trick:

<div style="display:none">   <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">   </script> </div> 
like image 68
Tyler Avatar answered Oct 22 '22 06:10

Tyler