问题描述:

I am using google conversion code for tracking the session of the user and i am using in a php but it is not recording the sesion,Can anyone suggest what is the problem,Their are different pages and i am grabbing the page url via jquery and adding the conversion label

 <!-- Google Code for Search-UAE-English-Skincare-mobiiwold Conversion Page -->

<script type="text/javascript">

/* <![CDATA[ */

var google_conversion_id = 994725859;

var google_conversion_language = "en";

var google_conversion_format = "3";

var google_conversion_color = "ffffff";

var google_conversion_label = <?php echo $label?>;

var google_remarketing_only = false;

$(document).ready(function() {

var link = $(location).attr("href");

if(link == "http://booknow.drbatras.ae/campaign/skin-care/") {

google_conversion_label = VEa_CMe_rmUQ45-p2gM;

} else if( link == "http://booknow.drbatras.ae/campaign/obesity/") {

google_conversion_label = -Xq-CJCtwGUQ45-p2gM;

} else if(link == "http://booknow.drbatras.ae/campaign/al-wasl-branch/") {

google_conversion_label = KhRoCMX8tGUQ45-p2gM;

} else if(link == "http://booknow.drbatras.ae/campaign/worried-about-hairloss/") {

google_conversion_label = T8nbCJSR7mUQ45-p2gM;

} else if(link == "http://booknow.drbatras.ae/campaign/ar-hair-loss/") {

google_conversion_label = 7MhmCMSqgWYQ45-p2gM;

} else if(link == "http://booknow.drbatras.ae/campaign/ar-skin-care/") {

google_conversion_label = ef7rCLapwGUQ45-p2gM;

} else if(link == "http://booknow.drbatras.ae/campaign/ar-obesity/") {

google_conversion_label = YPVwCJyJuWUQ45-p2gM;

} else if(link == "http://booknow.drbatras.ae/campaign/ar-allergy/") {

google_conversion_label == 95cLCNuzv2UQ45-p2gM;

} else if(link == "http://booknow.drbatras.ae/campaign/ar-al-wasl-branch/") {

google_conversion_label = OKx6CJ2nyGUQ45-p2gM;

}

});

/* ]]> */

</script>

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

</script>

<noscript>

<div style="display:inline;">

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

</div>

</noscript>

网友答案:

Below link will help you. You need to modify your code completely.

https://www.optimizesmart.com/understanding-sessions-in-google-analytics/

相关阅读:
Top