AdWords
4.5K members online now
4.5K 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

how to add adwords conversion tracking code on a php page where there are no <body></body> tags

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hey fellows ,i have a site in WordPress but the thank you pages are built with another system and they are php pages.I need to install the conversion tracking code in the thank you pages but there are no <body></body> tags.How should i place the code?

1 Expert replyverified_user

how to add adwords conversion tracking code on a php page where there are no &lt;body&gt;&lt;/body&gt; tags

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

Hey Mathaios,

 

In Appearance > Editor find header.php if you can, and that's where <body> starts

 

Ali

how to add adwords conversion tracking code on a php page where there are no &lt;body&gt;&lt;/body&gt; tags

Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

Sorry Mathaois I gave you a solution that would apply to all pages!

 

So when you edit your thank you page, you can switch to TEXT to edit the HTML and insert your conversion tag in there.

 

Ali

how to add adwords conversion tracking code on a php page where there are no &lt;body&gt;&lt;/body&gt; tags

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hey Ali,thanks for replying but i m talking about php pages.I paste the thank you page `s code below,can you please where to add the conversion tracking?

 

<!--<section id="content_wrapper">

<section id="content">
<h2 style="text-align:center; font-weight:bold;"> <?=$mess?></h2>-->






  <style>
   @import url(https://fonts.googleapis.com/css?family=Sigmar+One);
    .succ{
      
         font-family: 'Sigmar One', cursive;
         font-style: normal;        
         color:#f58b3c;
         color:#2a74d6;
         text-shadow: 0px 5px 1px rgba(0, 0, 0, 0.25);         
         font-size: 40px;
         }


   </style>



<section id="content_wrapper">

    <section id="content" style="margin-top:45px;">
        <div class="br-t panel panel-info">
           <!-- <div class="panel-heading">
                <div class="panel-title fs20"></div>
            </div>-->
            
            
            <div class="panel-body pn">
                <div class="col-lg-12">
                    <div class="infobox">
                    <h1 class="succ" >Thank You For Your Free Trial </h1>
                        <section class="abc">
                            <div style="width:100%; " >
                              
                    <div style="width:100%;font-family: Arial,Helvetica,sans-serif;  color:#010101; font-size:18px">
                                         <br> <strong>Dear <?php echo $cus_full_name;?>,</strong>
                                </div>
                        <div style="width:100%;font-family: Arial,Helvetica,sans-serif; color:#666766; font-size:15px; line-height:21px">
                                   <br>
                     <p>
                 A new order <strong>#<?php echo $order_id;?></strong> has been made in <strong> Asia</strong>. It is a Free Trial.
                            </p>                
                                </div>    
                                
                                <div style="width:100%">
                                    <br/>
                                </div>
                                <div style="width:100%;font-family: Arial,Helvetica,sans-serif; color:#666766; font-size:16px; line-height:20px">
                                    <strong>
                                        Thanks,
                                     </strong><br>
                                    <strong> Mathaios </strong>
                                    <br>
                                    <strong> House# 205, (5th Floor) Road #02 </strong>
                                    <br>
                                    <strong> BLSBLA </strong>
                                    <br>
                                    <span>Skype:<b>me</b></span>
                                    <br>
                                    <span>Phone:<b>+CALL ON THE MOON</b></span>                
                                </div>
                                <div style="width:100%">
                                    <br/>
                                </div>
                            </div>
                        </section>
                    </div>
                </div>
                    
              
            </div>
        </div>                

how to add adwords conversion tracking code on a php page where there are no &lt;body&gt;&lt;/body&gt; tags

Explorer ✭ ✭ ☆
# 5
Explorer ✭ ✭ ☆

Hey! You can add the tag right at the end after the final </div>

how to add adwords conversion tracking code on a php page where there are no &lt;body&gt;&lt;/body&gt; tags

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Not working...

 

how to add adwords conversion tracking code on a php page where there are no &lt;body&gt;&lt;/body&gt; tags

Top Contributor
# 7
Top Contributor

Hi Mathaiox V,

 

What's not working? Do you see the code on the page? Are conversions not being recorded? How are you testing?

 

Best of Luck,

 

Pete

 

petebardo -- Deadhead doing AdWords

how to add adwords conversion tracking code on a php page where there are no &lt;body&gt;&lt;/body&gt; tags

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Hey Ali,finaly this worked and now conversions are tracked.

I only placed the conversion tracking just in the beginning of the code.

Thanks a lot!