English 中文(简体)
Google Adwords Reporting With Dynamic PHP Conversion Value
原标题:

I am using Google Adwords to push and track subscriber acquisitions on my site, but can not get the conversion reporting to work.

Here is my setup.

My subscribe form is dynamically loaded on my subscribe page by a Wordpress plugin I created. After validation the form is replaced with a thank you message with php, so the user is not redirected to a confirmation page. Because of this, I think I need to check for the output of a conversion value to get Adwords to report.

I have followed the adwords help docs and have made the reporting a "purchase/sale" tracking so I can test for the conversion_value variable.

Here is my plugin code that outputs the thank you message.

//****[ Variable Conversion Value For Google AdWords]****
$variableConversionValue =  <h3 class="subscribeConfirm">Thanks for signing up!</h3> ;

//****[ After writing subscriber data, display thank you message****
echo $variableConversionValue;

Here is my Adwords Tracking (did not include generic tracking code) that is on my subscribe page (is a php page, but the tracking in not contained within php tags).

if (<? echo $variableConversionValue; ?>) {
  google_conversion_value = <? echo $variableConversionValue; ?>;
}

Can you please help me get the reporting to work? Thanks!

最佳回答

I have figured it out.

When viewing my live page source with the code above, the echo $variableConversionVale code was blank, meaning it was not carrying the value over correctly. So instead of using the variable, I put in exactly what would be displayed to track the conversion.

Example:

if ( <h3 class="subscribeConfirm">Thanks for signing up!</h3> ) { google_conversion_value = <h3 class="subscribeConfirm">Thanks for signing up!</h3> ; /> }

Using the above code, it tracks a conversion only when the confirmation that you have been subscribed pops up.

Reference link here under step 4 "Different scenarios for inserting the code snippet"

Thanks!

问题回答

I m not sure you are understanding the purpose of the conversion values. If you are looking for a binary "the conversion occurred", I m not sure you need to specify a value at all, but if you do, you should be using a number like 1 or whatever you feel the dollar value of a lead is. I may be wrong, but I don t think Adwords will be able to process text/html in the value as anything meaningful.

If your code for checking the form and output are in two different places (as it looks like from above), maybe what you really want in your output is:

if (<? echo $variableConversionValue; ?>) {
  google_conversion_value = <? echo  1 ; ?>;
}




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签