-
AuthorPosts
-
July 21, 2015 at 2:27 pm #336181
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
July 21, 2015 at 2:33 pm #336185One 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?
July 21, 2015 at 2:43 pm #336196Hey 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!
July 22, 2015 at 5:41 am #336796This reply has been marked as private.July 22, 2015 at 11:57 am #337173Hi 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.July 22, 2015 at 1:51 pm #337285Thanks 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.
July 22, 2015 at 6:26 pm #337500You’re welcome Adam!
August 5, 2015 at 5:00 am #350582Hi – 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?
August 5, 2015 at 6:37 am #350655Hi 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.
-
AuthorPosts