The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 09-28-2011, 05:03 PM
drinceanu's Avatar
drinceanu is offline
 
Join Date: Apr 2011
Posts: 6
Question

Run script when the confirm order is clicked


Hello,

I'm on a situation in wich I hope someone can help me, because i really like my ecwid store. Recently we run our Ad Words camapigns by a specialized firm, who asks me to insert a java script code on the last page of the order(after the confirm order button is clicked), to see the conversion rate and other things so they can have data to make the adwords campaigns more successful.
My site is in Joomla, at www.ifinitrade.ro
How can I do that?

Thank you for your time.
  #2  
Old 09-28-2011, 11:01 PM
Qetzal's Avatar
Qetzal Qetzal is offline
Ecwid Team
 
Join Date: Sep 2009
Posts: 10,847
Default

Quote:
Originally Posted by drinceanu View Post
Hello,

I'm on a situation in wich I hope someone can help me, because i really like my ecwid store. Recently we run our Ad Words camapigns by a specialized firm, who asks me to insert a java script code on the last page of the order(after the confirm order button is clicked), to see the conversion rate and other things so they can have data to make the adwords campaigns more successful.
My site is in Joomla, at www.ifinitrade.ro
How can I do that?

Thank you for your time.
It can be done using our JavaScript API: http://kb.ecwid.com/w/page/41188517/JavaScript%20API

What code do you need to add?
__________________
Eugene K.
Ecwid Team

@ecwid | Facebook | Ecwid Knowledge Base
  #3  
Old 09-29-2011, 07:40 AM
drinceanu's Avatar
drinceanu drinceanu is offline
 
Join Date: Apr 2011
Posts: 6
Default

Thank you for your faast reply, I need to run this code:

<!-- Google Code for Finalizare comanda Conversion Page -->

<script type="text/javascript">

/* <![CDATA[ */

var google_conversion_id = 1007514786;

var google_conversion_language = "en";

var google_conversion_format = "2";

var google_conversion_color = "ffffff";

var google_conversion_label = "-C6rCN6hgAMQoum14AM";

var google_conversion_value = 0;

/* ]]> */

</script>

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

</script>

<noscript>

<div style="display:inline;">

<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1007514786/?label=-C6rCN6hgAMQoum14AM&amp;guid=ON&amp;script=0"/>

</div>

</noscript>

after a order has been placed, before the body tag.
  #4  
Old 09-29-2011, 08:34 AM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

The script for your case is the following:

Code:
<script type="text/javascript">
Ecwid.OnPageLoaded.add(function(page) {
  if (page.type === 'ORDER_CONFIRMATION') {
    window.google_conversion_id = 1007514786;
    window.google_conversion_language = "en";
    window.google_conversion_format = "2";
    window.google_conversion_color = "ffffff";
    window.google_conversion_label = "-C6rCN6hgAMQoum14AM";
    window.google_conversion_value = 0;
    (function() {
      var script;
      script = window.document.createElement('script');
      script.src = "http://www.googleadservices.com/pagead/conversion.js";
      window.document.body.appendChild(script);
    })();
  }
});
</script>
Paste it into your page, after the Ecwid embed code.
  #5  
Old 09-29-2011, 09:44 AM
drinceanu's Avatar
drinceanu drinceanu is offline
 
Join Date: Apr 2011
Posts: 6
Default

Thank you all for all the help, realy apriciate it.
  #6  
Old 10-11-2011, 06:39 PM
ben Jackson's Avatar
ben Jackson ben Jackson is offline
 
Join Date: Apr 2010
Posts: 80
Default

Any idea how this can be done on a joomla site using the rokecwid component?
  #7  
Old 10-11-2011, 06:41 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Quote:
Originally Posted by ben Jackson View Post
Any idea how this can be done on a joomla site using the rokecwid component?
The same way, by placing a special script that utilizes the Ecwid JavaScript API. Only you need to publish this code inside a 'Custom HTML' module in your Joomla, which in turn you publish in any position of your template on the shop page.
  #8  
Old 10-11-2011, 08:38 PM
ben Jackson's Avatar
ben Jackson ben Jackson is offline
 
Join Date: Apr 2010
Posts: 80
Default

Eugene

Many thanks for your v fast response.. just added it to my site so lets see what happens.. many thanks for you help.

Ben
  #9  
Old 10-20-2011, 09:23 PM
End Dream's Avatar
End Dream End Dream is offline
 
Join Date: Oct 2011
Posts: 6
Default

Hello,

I am currently trying to add the conversion javascript you provided. I added it to the page my shop is on (right under the shop code). Is this correct? Or do I need to do something with the Ecwid Javascript API? Thanks.
  #10  
Old 10-21-2011, 09:40 AM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Quote:
Originally Posted by End Dream View Post
Hello,

I am currently trying to add the conversion javascript you provided. I added it to the page my shop is on (right under the shop code). Is this correct? Or do I need to do something with the Ecwid Javascript API? Thanks.
The code you have used on your site is already based on the Ecwid JavaScript API. Once you've pasted it in, it should work immediately, no additional actions are needed.

I've recently set up an automated tool to generate similar scripts out from the conversion code provided by Google, more information here: http://kb.ecwid.com/w/page/46457544/...o%20my%20store
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:55 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.