5.8K members online now
5.8K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me

Is it possible to run javascript on successful conversion

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi Team,


I hope there is someone still at their computer! Only two days to Christmas!!


We have a website where we allow visitors to sign up and create an account.

What I'm wanting to do is save as much adwords referral information about a customer into our database during the signup process.


Is there a way that when the Google adwords conversion code runs and successfully logs a conversion that we can run some ajax or get access to the cookies that are created on the domain?


I'm running the standard conversion code snipped for a website like..


Is there a callback function I can run? Hopefully with a JS variable about the gclid that converted etc ?

To make things more ticky, the domain that the signup form is on is actually a different TLD to the Ad click landing page so the _utmXXX cookies aren't available..


<!-- Google Code for Blastoff Signup NZ Conversion Page -->

<script type="text/javascript">

/* <![CDATA[ */

var google_conversion_id =  ;

var google_conversion_language = "en";

var google_conversion_format = "3";

var google_conversion_color = "ffffff";

var google_conversion_label = "";

var google_remarketing_only = false;

/* ]]> */


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



<div style="display:inline;">

<img height="1" width="1" style="border-style:none;" alt="" src="//;guid=ON&amp;script=0"/>




I hope there is a solution!





1 Expert replyverified_user

Re: Is it possible to run javascript on successful conversion

Community Manager
# 2
Community Manager
Hi Richard,

You might want to see if the "User ID" feature in Google Analytics would work for you. The User ID lets you associate engagement data from multiple devices and different sessions with unique IDs.

Each unique User ID is considered to be a unique user in Google Analytics, so you get a more accurate user count in your reports. When you send Google Analytics an ID and related data over the course of multiple sessions, you can also put individual user actions in context and start analyzing ongoing relationships.

Check out the Help Center for more info on this: