AdWords
2.4K members online now
2.4K 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
star_border
Reply

Where do I insert the tracking code? I dont have a thank you page.

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hey!

I will paste the code I have on my contacto-form.php file. The thing is I don't have a thank you page and I don't know where exactly do I have to paste the google conversion code (in what file and in what code line). 

 

I have read other conversations, but I don't fully understand what I have to do. 

Thanks!!!

 

Code: 

<?php
$to="mr.rivers220@gmail.com";/*rro@quintaimagen.com.mx*/
$subject="Message from the Landing - Contact Form ";

$date=date("l, F jS, Y");
$time=date("h:i A");

$name=$_REQUEST['name'];
$email=$_REQUEST['email'];
$phone=$_REQUEST['phone'];
$caoch=$_REQUEST['caoch'];
$file=$_REQUEST['file'];


$msg="
Mensaje enviado de la landing en la fecha $date, a la hora: $time.\n
First Name: $name\n
Email: $email\n
Phone: $phone\n
Caoch: $caoch\n
File: $file
";
if($email=="") {
echo "<div class='alert alert-danger'>
<a class='close' data-dismiss='alert'>×</a>
<strong>¡Error!</strong> Favor de llenar todos los campos.
</div>";
} else {
mail($to,$subject,$msg,"From:".$email);
echo "<div class='alert alert-success'>
<a class='close' data-dismiss='alert'>×</a>
<strong>¡Gracias! Nos comunicaremos contigo</strong>
</div>";
}


?>

 

1 Expert replyverified_user

Re: Where do I insert the tracking code? I dont have a thank you page

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭
Hi Roberto,

If you don't have a Thank You page, you can use Google Analytics event tracking code (https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide), which can be applied to the button that users click to complete the process.

You can convert this into a goal and import this into your AdWords account as a conversion.

Hope this helps.

Kate

Re: Where do I insert the tracking code? I dont have a thank you page

Top Contributor
# 3
Top Contributor
HI Roberto,

You can use event tracking as Kate W has suggested.

The code I see here looks like you are using Ajax or a call-back to display results of the form submission. I find the easiest way to record the conversion is to return the image part of the AdWords conversion code with that content. I'd place it after the link, but it doesn't really matter much where you put it within the block of html you are returning to the page. Do not include the noscript tags, just the image.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

Re: Where do I insert the tracking code? I dont have a thank you page

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Thank you, Pete!!
I think my client doesn't want to use Google Analytics.
Regarding the other solution you suggest, I don't know where the image part of the code is.
I am going to paste the conversion code at the end of this message. Another thing, should I paste it in the PHP document, or in the html of the landing page? Thanks!!!


<!-- Google Code for Contacto Conversion Page -->
&lt;script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 965456725;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "E9LeCIvChwkQ1eauzAM";
var google_remarketing_only = false;
/* ]]> */
&lt;/script&gt;
&lt;script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
&lt;/script&gt;
<noscript&gt;
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/965456725/?label=E9LeCIvChwkQ1eauzAM&amp;guid=ON&amp;scri...
</div>
</noscript&gt;
<!-- Google Code for CONTACTO Conversion Page -->
&lt;script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1000525387;
var google_conversion_language = "es";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "6Jh1CKXhjgIQy5yL3QM";
var google_conversion_value = 1.00;
var google_remarketing_only = false;
/* ]]> */
&lt;/script&gt;
&lt;script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
&lt;/script&gt;
<noscript&gt;
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1000525387/?value=1.00&amp;label=6Jh1CKXhjgIQy5yL3QM&amp;...
</div>
</noscript&gt;

Re: Where do I insert the tracking code? I dont have a thank you page

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thank you Kate!!! I think my client doesn't want to use Google Analytics. I am new to this so I don't even know the pros and cons of each service.

Re: Where do I insert the tracking code? I dont have a thank you page

Follower ✭ ✭ ✭
# 6
Follower ✭ ✭ ✭
Hi Roberto,

I would highly recommend your client uses Google Analytics; it can give you so much insight as to how the website is performing and how visitors are interacting, plus it's free!

Here's a little snapshot of some of the features on Google Analytics http://www.google.co.uk/analytics/features/. Do bear this in mind, it will make your tracking a lot easier to implement too!

Do let me know if you need any more info.

Re: Where do I insert the tracking code? I dont have a thank you page

Top Contributor
# 7
Top Contributor
Hi Roberto,

This is the image part:
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1000525387/?value=1.00&amp;label=6Jh1CKXhjgIQy5yL3QM&amp;...

Place this is the PHP document here:

} else {
mail($to,$subject,$msg,"From:".$email);
echo "<div class='alert alert-success'>
<a class='close' data-dismiss='alert'>×</a>
<strong>¡Gracias! Nos comunicaremos contigo</strong>
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1000525387/?value=1.00&amp;label=6Jh1CKXhjgIQy5yL3QM&amp;...
</div>";
}

Have your php code replace the value (1.00) with the actual value if it is a sale.

Best of Luck!

Pete

petebardo -- Deadhead doing AdWords