Title: Conversion tracking code integration
Last modified: August 20, 2016

---

# Conversion tracking code integration

 *  [iohannis](https://wordpress.org/support/users/iohannis/)
 * (@iohannis)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/conversion-tracking-code-integration/)
 * Hi,
 * I have a client who uses this plugin, and he wants to track conversions with 
   a script (javascript) from Adwords. However, I don’t see how to integrate the
   code, to fire either on signup using ajax or any thank you page. Could you give
   me a hint on where to look?
 * Thanks,
    Calle
 * [http://wordpress.org/extend/plugins/mailchimp/](http://wordpress.org/extend/plugins/mailchimp/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [mc_tak](https://wordpress.org/support/users/mc_tak/)
 * (@mc_tak)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/conversion-tracking-code-integration/#post-3561064)
 * Hey Calle,
 * Thanks for writing in. While this goes a bit outside of our range of support,
   I’d be happy to take a look to see if I can make any recommendations on how to
   incorporate the interaction you’re looking for.
 * Could you provide me with a bit more detail on what the script needs to access
   in order to work? How is it intended to work alongside the plugin’s sign up form
   functionality? Is there an example process you could provide?
 * As this question has to primarily do with how to utilize an outside script/plugin,
   it may be worth consulting their developers or support team, in order to troubleshoot
   the issue as well.
 * We look forward to hearing back!
 *  Thread Starter [iohannis](https://wordpress.org/support/users/iohannis/)
 * (@iohannis)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/conversion-tracking-code-integration/#post-3561067)
 * Thanks for replying. It’s a conversion code from Google Adwords, that needs to
   be triggered on successful signup.
 * This is sample code from Google:
 *     ```
       <!-- Google Code for Purchase Conversion Page -->
         <script type="text/javascript">
         /* <![CDATA[ */
         var google_conversion_id = 1234567890;
         var google_conversion_language = "en_US";
         var google_conversion_format = "1";
         var google_conversion_color = "666666";
         var google_conversion_label = "Purchase";
         if (10.0) {
         var google_conversion_value = 10.0
         }
         /* ]]> */
         </script>
         <script type="text/javascript"
         src="http://www.googleadservices.com/pagead/
         conversion.js">
         </script>
         <noscript>
         <img height=1 width=1 border=0
         src="http://www.googleadservices.com/pagead/
         conversion/1234567890/
         ?value=10.0&label=Purchase&script=0">
         </noscript>
       ```
   
 * Perhaps I could do a callback to the image url, somehow? I don’t know how to 
   trigger the callback without altering your plugin…(?)
 *  [mc_tak](https://wordpress.org/support/users/mc_tak/)
 * (@mc_tak)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/conversion-tracking-code-integration/#post-3561165)
 * Hey there,
 * One option would be to integrate the script into the existing plugin code. However,
   I’m afraid that we are not able to provide support in this forum in regards to
   customizing the plugin’s code, so that I’m afraid that would ultimately have 
   to be researched independently. The plugin code can be accessed by going to the
   WP Admin page > Plugins > Editor > MailChimp.
 * As far as alternative implementations, I’m not quite familiar with the script
   in question, but depending on what information the script needs access to, there
   may be some other options to consider. For example, if you’re looking to have
   it interact with successful signups only, you may consider using a webhook event(
   which is available in your MailChimp account).
 * A webhook will pass the subscriber information to a designated URL whenever a
   successful sign up occurs:
 * [http://apidocs.mailchimp.com/webhooks/](http://apidocs.mailchimp.com/webhooks/)
 * If I’m understanding the nature of the script correctly, webhooks could be utilized
   to pass that information to your script and be used in the way you’re looking
   for. Webhooks will fire when a successful signup occurs on your WordPress MailChimp
   plugin form as well.
 * If you have any further questions, just let us know!
 *  [Andrew Rowland](https://wordpress.org/support/users/arowls/)
 * (@arowls)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/conversion-tracking-code-integration/#post-3561208)
 * [@iohannis](https://wordpress.org/support/users/iohannis/) You can achieve what
   your client wants to do in one of two ways (or others I am sure)
 * 1) Set-up a custom “Thank You” page for MailChimp and add the conversion tracking
   code above to that page. ([http://kb.mailchimp.com/article/can-i-design-and-host-my-own-thank-you-pages-instead-of-using-mailchimps](http://kb.mailchimp.com/article/can-i-design-and-host-my-own-thank-you-pages-instead-of-using-mailchimps))
   
   NOTE: If you are using the “Advanced Form Builder” you will not see the option
   for the custom thank you URL, and will unfortunately need to use a META refresh
   tag on their thank you page that sends people to the custom URL with your conversion
   tracking ([http://www.w3.org/TR/WCAG20-TECHS/H76.html](http://www.w3.org/TR/WCAG20-TECHS/H76.html))
 * 2) Customize the plugin. Here is an example I just coded up for my site after
   realizing that the mailchimp plugin will not let you set a custom Thank you URL…
   [http://pastebin.com/X3PgGntk](http://pastebin.com/X3PgGntk)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Conversion tracking code integration’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp/assets/icon.svg?rev=3156997)
 * [Mailchimp List Subscribe Form](https://wordpress.org/plugins/mailchimp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp/reviews/)

## Tags

 * [conversion](https://wordpress.org/support/topic-tag/conversion/)

 * 4 replies
 * 3 participants
 * Last reply from: [Andrew Rowland](https://wordpress.org/support/users/arowls/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/conversion-tracking-code-integration/#post-3561208)
 * Status: not resolved