Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Dynamic Remarketing Rate Topic   * * * * * 1 votes

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 12 September 2014 - 10:50 AM #21

eComLabs, that was great help, thank you for the assistance. Looks like with the newest CSCart version,

/* <![CDATA[ */


is being replaced as


//<![CDATA[

This is preventing Google to recognize their code on the website. What is the best way to be able to include the code to show on the wewbsite "as is" ?

Thank you


Please take a look:

http://forum.cs-cart...to-cs-cart-421/

We have completely switched to HTML5. There is no more need in the following structure in JavaScript code:

//<![CDATA[
...
//]]>


Just remove it.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 24 June 2015 - 10:20 AM #22

Try this code:

{if $controller eq 'checkout' && $mode ne 'complete'}
{capture name="cart_order_info"}
{foreach from=$cart_products item="item" name="products"}
'{$item.product_code}'{if not $smarty.foreach.products.last},{/if}
{/foreach}
{/capture}
{/if}

{if $controller eq 'checkout' && $mode eq 'complete'}
{capture name="checkout_order_info"}
{foreach from=$order_info.items item="item" name="products"}
'{$item.product_code}'{if not $smarty.foreach.products.last},{/if}
{/foreach}
{/capture}
{/if}

{literal}
<!-- Google Code for Remarketing Tag -->
<!--------------------------------------------------
Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup
--------------------------------------------------->

<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: {/literal}{if $controller eq 'products'}'{$product.product_code}',{elseif $controller eq 'checkout' && $mode ne 'complete'}[{$smarty.capture.cart_order_info}],{elseif $controller eq 'checkout' && $mode eq 'complete'}[{$smarty.capture.checkout_order_info}],{else}'',{/if}{literal}

ecomm_pagetype: '{/literal}{if $controller eq 'index'}home{elseif $controller eq 'categories'}category{elseif $controller eq 'products'}product{elseif $controller eq 'checkout' && $mode eq 'complete'}purchase{elseif $controller eq 'checkout' && $mode ne 'complete'}cart{else}siteview{/if}{literal}',
ecomm_totalvalue: '{/literal}{if $controller eq 'products'}{$product.price|number_format:2}{elseif $controller eq 'checkout' && $mode eq 'complete'}{$order_info.subtotal|number_format:2}{elseif $controller eq 'checkout' && $mode ne 'complete'}{$cart.subtotal|number_format:2}{/if}{literal}',
};
</script>

<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = XXXXXXXXXXX;
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/XXXXXXXXXXXX/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
{/literal}


Ecom labs where do we need to paste this code ? Do we need to create a my_changes file for this ? Or somewhere else.
Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 24 June 2015 - 01:19 PM #23

That code is for 3.0.x versions (!)

You can add it to the following file:

skins\basic\customer\addons\my_changes\hooks\checkout\order_confirmation.post.tpl

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 24 June 2015 - 01:21 PM #24

That code is for 3.0.x versions (!)

You can add it to the following file:

skins\basic\customer\addons\my_changes\hooks\checkout\order_confirmation.post.tpl


I cant find this path it seems its of some old version, do you mean to say this path
\design\themes\vivashop\templates\addons\my_changes\hooks\checkout\order_confirmation.post.tpl

Also is the code below correct for MVE 4.2.4 since the output i get is
{if $controller eq 'checkout' && $mode ne 'complete'}
{capture name="cart_order_info"}
{foreach from=$cart_products item="item" name="products"}
'{$item.product_code}'{if not $smarty.foreach.products.last},{/if}
{/foreach}
{/capture}
{/if}
{if $controller eq 'checkout' && $mode eq 'complete'}
{capture name="checkout_order_info"}
{foreach from=$order_info.products  item="item" name="products"}
'{$item.product_code}'{if not $smarty.foreach.products.last},{/if}
{/foreach}
{/capture}
{/if}
{literal}
<!-- Google Code for Remarketing Tag -->
<!--------------------------------------------------
Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup
--------------------------------------------------->
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: {/literal}{if $controller eq 'products'}'{$product.product_code}',{elseif $controller eq 'checkout' && $mode ne 'complete'}[{$smarty.capture.cart_order_info}],{elseif $controller eq 'checkout' && $mode eq 'complete'}[{$smarty.capture.checkout_order_info}],{else}'',{/if}{literal}
ecomm_pagetype: '{/literal}{if $controller eq 'index'}home{elseif $controller eq 'categories'}category{elseif $controller eq 'products'}product{elseif $controller eq 'checkout' && $mode eq 'complete'}purchase{elseif $controller eq 'checkout' && $mode ne 'complete'}cart{else}siteview{/if}{literal}',
ecomm_totalvalue: '{/literal}{if $controller eq 'products'}{$product.price|number_format:2}{elseif $controller eq 'checkout' && $mode eq 'complete'}{$order_info.subtotal|number_format:2}{elseif $controller eq 'checkout' && $mode ne 'complete'}{$cart.subtotal|number_format:2}{/if}{literal}',
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = xxxxxxx;
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}


Output is

<script type="text/javascript">var google_tag_params={ecomm_prodid:'',ecomm_pagetype:'siteview',ecomm_totalvalue:'',};</script>
Also i have a query that :
  • if we are posting this code on checkout page only then how will the google track the products which a customer:
  • has viewed.
  • added to cart but dint checkout.
  • checked out but dint pay
  • added to wishlist.


Does this make sense.
  • Wouldn't this code be required on Product page / Cart/ Checkout / Wishlist page as well to track that information so that google can remarket that product to the customer.
  • Is order_confirmation.post.tpl the right place to post this code or some better way exists to cover all above scenarios.

Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 25 June 2015 - 09:31 AM #25

In the latest versions you should use $order_info.products instead of the $order_info.items . Please try.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 25 June 2015 - 10:03 AM #26

In the latest versions you should use $order_info.products instead of the $order_info.items . Please try.

I am using the same only.
Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 26 June 2015 - 02:03 PM #27

Please also try:

$runtime.controller and $runtime.mode

instead of

$controller and $mode

Note that this code will output totals on the checkout and order landing pages only.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 26 June 2015 - 03:02 PM #28

Please also try:

$runtime.controller and $runtime.mode

instead of

$controller and $mode

Note that this code will output totals on the checkout and order landing pages only.


Thanks Ecom labs it works , you are awesome, cant thank you enough for all the help you provide.

Just one more thing how do i track the same info for the cases below when customer:
  • added product to cart but dint checkout.
  • checked out but dint pay
  • added to wishlist.

Warm Regards,
Admin | MVE: 4.2.4

 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 29 June 2015 - 10:42 PM #29

Just one more thing how do i track the same info for the cases below when customer:
  • added product to cart but dint checkout.
  • checked out but dint pay
  • added to wishlist.

Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 30 June 2015 - 09:26 AM #30

I am afraid, these features are not supported by the remarketing code. It is required to integrate additional services. E.g.:

http://www.practical...Events-to-Track

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • crazyshark20
  • Junior Member
  • Members
  • Join Date: 19-Aug 09
  • 285 posts

Posted 25 August 2016 - 08:08 AM #31

Can anyone try and add this addon in v.4? How can we do?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 25 August 2016 - 02:12 PM #32

Can anyone try and add this addon in v.4? How can we do?

 

We can perform integration within the separate task for you. Feel free to contact us


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • technoob
  • Senior Member
  • Trial users
  • Join Date: 08-Jun 15
  • 309 posts

Posted 26 August 2016 - 11:47 AM #33

buy the addon from simtech for this purpose.



 
  • Judoka_xx
  • Newbie
  • Trial users
  • Join Date: 25-Oct 16
  • 5 posts

Posted 21 February 2017 - 10:58 AM #34

{if $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}

{capture name="cart_order_info"}

{foreach from=$cart_products item="item" name="products"}

'{$item.product_code}'{if not $smarty.foreach.products.last},{/if}

{/foreach}

{/capture}

{/if}



{if $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}

{capture name="checkout_order_info"}

{foreach from=$order_info.products item="item" name="products"}

'{$item.product_code}'{if not $smarty.foreach.products.last},{/if}

{/foreach}

{/capture}

{/if}



{literal}

<!-- Google Code for Remarketing Tag -->

<!--------------------------------------------------

Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup

--------------------------------------------------->



<script type="text/javascript">

var google_tag_params = {

dynx_itemid: {/literal}{if $runtime.controller eq 'products'}'{$product.product_code}',{elseif $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}[{$smarty.capture.cart_order_info nofilter}],{elseif $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}[{$smarty.capture.checkout_order_info nofilter}],{else}'',{/if}{literal}



dynx_pagetype: '{/literal}{if $runtime.controller eq 'index'}home{elseif $runtime.controller eq 'categories'}searchresults{elseif $runtime.controller eq 'products'}offerdetail{elseif $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}conversionintent{elseif $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}conversion{else}other{/if}{literal}',

dynx_totalvalue: '{/literal}{if $runtime.controller eq 'products'}{$product.price|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}{$order_info.subtotal|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}{$cart.subtotal|number_format:2}{/if}{literal}',

};

</script>



<script type="text/javascript">

/* <![CDATA[ */

var google_conversion_id = XXXXXXXXX;

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/XXXXXXXXX/?value=0&amp;guid=ON&amp;script=0"/>

</div>

</noscript>

{/literal}

I 'm using this code and everything looks fine but gives me an error at Tag assistant :

 

google_tag_params

 

{
"dynx_itemid": "abcgfr543",
"dynx_pagetype": "offerdetail",
"dynx_totalvalue": "896.00"
}

 

Number field should not be quoted: 'dynx_totalvalue'

 

Any ideas?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 21 February 2017 - 01:20 PM #35

Looks like this

dynx_totalvalue: '{/literal}{if $runtime.controller eq 'products'}{$product.price|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}{$order_info.subtotal|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}{$cart.subtotal|number_format:2}{/if}{literal}',

should be replaced with

dynx_totalvalue: {/literal}{if $runtime.controller eq 'products'}{$product.price|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}{$order_info.subtotal|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}{$cart.subtotal|number_format:2}{else}0{/if}{literal},


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Judoka_xx
  • Newbie
  • Trial users
  • Join Date: 25-Oct 16
  • 5 posts

Posted 21 February 2017 - 01:57 PM #36

 

Looks like this

dynx_totalvalue: '{/literal}{if $runtime.controller eq 'products'}{$product.price|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}{$order_info.subtotal|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}{$cart.subtotal|number_format:2}{/if}{literal}',

should be replaced with

dynx_totalvalue: {/literal}{if $runtime.controller eq 'products'}{$product.price|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode eq 'complete'}{$order_info.subtotal|number_format:2}{elseif $runtime.controller eq 'checkout' && $runtime.mode ne 'complete'}{$cart.subtotal|number_format:2}{else}0{/if}{literal},

Thank you very very much. Works great. No error appears now but does not keep decimal under 1000. Don't think can be a problem 



 
  • vin86
  • Member
  • Members
  • Join Date: 16-Nov 09
  • 28 posts

Posted 11 June 2019 - 06:24 PM #37

how can i select product_id and not product_code (merchant center request product_id not sku products)?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 12 June 2019 - 06:03 AM #38

Use

{$product.product_id}

instead of

{$product.product_code}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • vin86
  • Member
  • Members
  • Join Date: 16-Nov 09
  • 28 posts

Posted 12 June 2019 - 07:24 PM #39

 

Use

{$product.product_id}

instead of

{$product.product_code}

 

Show always sku and not product id. 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19301 posts

Posted 13 June 2019 - 05:48 AM #40

Show always sku and not product id. 

 

Do not forget to clear cache


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.