Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #336181

    Adam C
    Participant

    I use bing ads, they’ve recently launched a new way to track conversions; Universal Event Tracking. The trouble is, it isn’t working for me, no conversions are showing even though I know am getting sales!!

    I was wondering if there is any guidance you can give on the best way to implement conversion tracking code on my thank you pages. Previously I’ve just used a text box to drop in the conversion snippet and it’s worked fine, but it doesn’t for the new bing ads UET.

    I’ve also tried placing it in the google analytics extension, doesn’t work doing it that way either.

    I know this may not necessarily be an X issue but, seeing as I see you guys as the wordpress experts (X is awesome by the way) & I buy a lot of licenses, I wondered if you can give any tips on how to resolve or trouble shoot the issue.

    I’ve checked, double checked & triple checked my setup in the Bing Ads interface and I am using that correctly, so I must be doing something wrong on my thank you pages.

    Thanks

    Adam

    #336185

    Adam C
    Participant

    One more thing I meant to add – wordpress seems add the UTF translation for & is replaced (#038). Maybe this has an impact? If so how do I prevent this?

    #336196

    Alexander
    Keymaster

    Hey Adam,

    You could be on to something with that & being converted. First, are you using the latest version of X and Cornerstone? We had a few bugs related to encoding in Cornerstone 1.0.0 and 1.0.1 but they should be resolved.

    I’d be more than happy to take a look at what’s going on. Would you mind providing login credentials in a private reply and linking to a page where you’ve added a tracking code?

    Meanwhile, just some general info if you want to troubleshoot.

    The best place to add javascript based tracking codes is in the Customizer if you want them globally on your site, or per page by using “Custom Javascript” on the settings tab of Cornerstone. Just remember that the <script> tags are already in place, so you should just add the javascript itself.

    Otherwise if your tracking code needs actual markup, you could use a “Raw Content” element in Cornerstone.

    Finally, you could use a child theme and directly add content into the page footer by using code like this in functions.php

    add_action( 'wp_footer', 'custom_tracking_code' );
    
    function custom_tracking_code() {
    
      // Added to every page
      ?>
    
      <script> /* your tracking code */ </script>
    
      <?php
    
      // Added to only page with ID of 1234
      if ( get_the_ID() == 1234 ) : ?>
    
        <script> /* your page specific tracking code */ </script>
      
      <?php endif;
    
    }

    Let me know if you have any other questions or would like me to take a closer look. Take care!

    #336796

    Adam C
    Participant
    This reply has been marked as private.
    #337173

    Alexander
    Keymaster

    Hi Adam,

    I checked that page, and it looks like you’re setting the image to display:none;visibility:hidden This tells the browser that it isn’t needed, and it doesn’t fetch the image; therefore nothing is tracked. Try removing that and I suspect it will start working.

    #337285

    Adam C
    Participant

    Thanks for the suggestion, I’ll give it a go. Although that is how bing ads supply the tracking code. It’s so frustrating as this should be straight forward but if it’s not working properly it’s such a pain for my business!! Thanks again, cheers, Adam.

    #337500

    Rad
    Moderator

    You’re welcome Adam!

    #350582

    Adam C
    Participant

    Hi – I’m still having issues with this. Bing ads are telling me the tracking code should be placed in the head section.

    I use the google analytics plugin to add my analytics code, which I notice is placed in the head section.

    Is it safe to add my bing ads conversion tracking using the google analytics plugin as well?

    #350655

    Paul R
    Moderator

    Hi Adam,

    To add your tracking code in head section, you can replace the line of code given above from this

    
    add_action( 'wp_footer', 'custom_tracking_code' );
    

    to this

    
    add_action( 'wp_head', 'custom_tracking_code' );
    

    If you notice I changed wp_footer to wp_head

    The entire code should look like this.

    
    add_action( 'wp_head', 'custom_tracking_code' );
    
    function custom_tracking_code() {
    
      // Added to every page
      ?>
    
      <script> /* your tracking code */ </script>
    
      <?php
    
      // Added to only page with ID of 1234
      if ( get_the_ID() == 1234 ) : ?>
    
        <script> /* your page specific tracking code */ </script>
      
      <?php endif;
    
    }
    

    Hope that helps.