Jump to content

how to insert Google Remarketing Code?


Recommended Posts

Hi,

 

From my understanding, and I may be completely wrong here, but you can insert the code into any tpl file in your active theme folder. I believe you need to enclose the entire code with the {literal}...{/literal} tags.

 

The idea is that you can insert the code (or different sets of code) to pages that you want to remarket. Basically, if you are remarketing your entire site (homepage) then it should be part of a page that is always visible to the user. So if the user lands on any page the cookie will be set.

 

However, some companies, for more complicated remarketing campaigns to further optimize and collect more detailed data they will only target specific pages. For example, if I just want to target a specific manufacturer's products, or simply keep them separate for tracking purposes.. I would place a specific code for each of the manufacturers and tailor a custom ad for each one of those manufacturers. So if the user lands on a specific manufacturer's product I know they are interested in that manufacturer so instead of wasting time marketing items they probably aren't interested in I can tailor a specific product or line of products to them all in the effort of higher conversions with less spend.

 

HTH!

Link to comment
Share on other sites

  • 11 months later...

Sorry for digging the old topic, but as it is important I thought it could help:

I've inserted the code into the footer.tpl:

<!-- Right -->
			<div id="right_column" class="column">
				{$HOOK_RIGHT_COLUMN}
			</div>
		</div>

<!-- Footer -->
		<div id="footer">{$HOOK_FOOTER}</div>
	</div>
{/if}

[GOOGLE CODE IS HERE]
</body>

 

but this collects all of the visitors as the footer is visible on every pages, so if you want to display google ads only to sort of visitors for example those who have visited an order page but never placed an order then you have to edit the order-opc.tpl (assuming that you have OPC) and place the google remarketing code in {literal} tags

{else}
	{capture name=path}{l s='Your shopping cart'}{/capture}
	{include file="$tpl_dir./breadcrumb.tpl"}
	<h2>{l s='Your shopping cart'}</h2>
	<p class="warning">{l s='Your shopping cart is empty.'}</p>
{/if}
{/if}
{literal}COOGLE CODE HERE{/literal}

 

and the second one in the confirmation.tpl (cashondelivery).

 

Then setup a google rules and watch the list of non buyers grows:) Of course you need to place the tag for every payment method.

Link to comment
Share on other sites

  • 1 year later...

Sorry for digging the old topic, but as it is important I thought it could help:

I've inserted the code into the footer.tpl:

<!-- Right -->
				<div id="right_column" class="column">
					{$HOOK_RIGHT_COLUMN}
				</div>
			</div>

<!-- Footer -->
			<div id="footer">{$HOOK_FOOTER}</div>
		</div>
	{/if}
	
[GOOGLE CODE IS HERE]
	</body>

but this collects all of the visitors as the footer is visible on every pages, so if you want to display google ads only to sort of visitors for example those who have visited an order page but never placed an order then you have to edit the order-opc.tpl (assuming that you have OPC) and place the google remarketing code in {literal} tags
{else}
		{capture name=path}{l s='Your shopping cart'}{/capture}
		{include file="$tpl_dir./breadcrumb.tpl"}
		<h2>{l s='Your shopping cart'}</h2>
		<p class="warning">{l s='Your shopping cart is empty.'}</p>
	{/if}
{/if}
{literal}COOGLE CODE HERE{/literal}
and the second one in the confirmation.tpl (cashondelivery).

 

Then setup a google rules and watch the list of non buyers grows:) Of course you need to place the tag for every payment method.

 

 

Hi. How to insert if I want to follow just one category from the shop? Thank you.

Link to comment
Share on other sites

  • 2 months later...
Hi, I have that same problem, but all solutions doesn't work.
When I paste my google code to footer.tpl I have...
....
....
</footer>
</div><!-- #footer -->
</div><!-- #page -->
{/if}
{include file="$tpl_dir./global.tpl"}
 
{literal}
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = xxxxxxxxxx;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/xxxxxxx/?value=0&guid=ON&script=0"/>
</div>
</noscript>
{/literal}
</body>
</html>

...

 

No HTTP response detected

 

Wersja PrestaShop: 1.6.0.6

Adres URL sklepu: http://www.silit.pl/     

Link to comment
Share on other sites

 

Missing HTTP Response

Missing HTTP Response denotes that, while the Google Analytics code was detected in the page source, the script itself did not execute. Each time the Google Analytics script executes, we expect an HTTP Response carrying the tracking request to Google’s servers.

This means that the Google Analytics code is not implemented properly on the page and no data will be collected.

Recommended Action: Reinstall the Google Analytics snippet by removing the current iteration, copy a new version from the Analytics interface, and insert that version into the site.

This is in help doc of google,make refer to Analytics but remk.is the same

maybe must paste again the code and find the proper place

good luck
Link to comment
Share on other sites

Thanks for response

 

I finally did it but I made something else.

I changed index.php and added google analitics code

 

.... on the begining of the file....

 

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-xxxxxxxxxxx-1', 'auto');
  ga('send', 'pageview');

</script>
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE

 

.....

 

 

and on the bottom of the file I added google remarketing code

 

.....

require(dirname(__FILE__).'/config/config.inc.php');
Dispatcher::getInstance()->dispatch();

?><script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1012960488;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/1012960488/?value=0&guid=ON&script=0"/>
</div>
</noscript>
<?

....

 

Now i have to wait for results.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Thanks for response

 

I finally did it but I made something else.

I changed index.php and added google analitics code

 

.... on the begining of the file....

 

<script>

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

 

  ga('create', 'UA-xxxxxxxxxxx-1', 'auto');

  ga('send', 'pageview');

 

</script>

<?php

/*

* 2007-2014 PrestaShop

*

* NOTICE OF LICENSE

 

.....

 

 

and on the bottom of the file I added google remarketing code

 

.....

require(dirname(__FILE__).'/config/config.inc.php');

Dispatcher::getInstance()->dispatch();

 

?><script type="text/javascript">

/* <![CDATA[ */

var google_conversion_id = 1012960488;

var google_custom_params = window.google_tag_params;

var google_remarketing_only = true;

/* ]]> */

</script>

<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">

</script>

<noscript>

<div style="display:inline;">

<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/1012960488/?value=0&guid=ON&script=0"/>

</div>

</noscript>

<?

....

 

Now i have to wait for results.

It is worked?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...