Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 General
 Search Engines & Marketing
 Help with conversion tracking - Microsoft
Author « Topic »  

homerads
Starting Member

United Kingdom
13 Posts

Posted - 03/26/2024 :  02:06:55  
Hi all,

We are looking to do some advertising with Microsoft and need to implement their conversion tracking.

Looking at the thanks.php and incthanks.php code, there seems to be ways an order can still fail from here so can anyone help with this please? Am willing to pay for guidance.

Thanks,

David

dbdave
ECT Moderator

USA
10426 Posts

Posted - 03/26/2024 :  06:17:48  
Hi, they should be providing some sample code, can you post that here?

It's likely you can just add this to your thanks.php page with no edits needed to the core files (incthanks.php)
There are some variables available to pass the order total and such.

Thanks,
David

homerads
Starting Member

United Kingdom
13 Posts

Posted - 03/27/2024 :  08:14:47  
Hi David,

Thank you for replying.

We've done "Step 1" where we have set up a global site tag for MS.

Now we have the following:

Step 2
1. Copy the code snippet below and paste it after the code that defines the email address and/or phone number variables on your webpage.
2. Replace the variable names with the real variable names you are defining on your page for these customer attributes. For example, if your variable name is "email_address", then edit the code to reflect that by replacing where it says "emailAddressVariable" with "email_address". You can also call a function that returns the value instead of the variable name.
3. If you only pass one of the two fields (either email address or phone number), you can replace the variable name with an empty string ("") for the other property. For example, replace “phoneNumberVariable” with "" if you don’t want to pass a phone number.
Enhanced conversion snippet
<script>
window.uetq=window.uetq||[];
window.uetq.push('set', { 'pid': {
'em': emailAddressVariable,
'ph': phoneNumberVariable
}});
</script>
Step 3
• - To track event on page load
Copy the snippet below and paste it in between the <head> and </head> tags of the page(s) you’d like to track, right after the base UET tag. Replace the event name and properties as appropriate.


<script>
window.uetq = window.uetq || [];
window.uetq.push("event", "PRODUCT_PURCHASE", {"ecomm_prodid":"REPLACE_WITH_PRODUCT_ID","ecomm_pagetype":"PURCHASE","revenue_value":Replace_with_Variable_Revenue_Function(),"currency":"GBP"});
</script>



• - To track event on inline action:
Copy the snippet below and paste it in between the <head> and </head> tags of the page(s) you’d like to track, right after the base UET tag. Replace the event name and properties as appropriate. Then, call the function "uet_report_conversion" when the specific action is taken i.e. button or URL is clicked.


<script>
function uet_report_conversion() {
window.uetq = window.uetq || [];
window.uetq.push("event", "PRODUCT_PURCHASE", {"ecomm_prodid":"REPLACE_WITH_PRODUCT_ID","ecomm_pagetype":"PURCHASE","revenue_value":Replace_with_Variable_Revenue_Function(),"currency":"GBP"});
}
</script>



Thank you for any help/advice.

David - HOMERADS

dbdave
ECT Moderator

USA
10426 Posts

Posted - 03/27/2024 :  09:35:58  
Hi, conversion tracking usually involves and order total being passed.
Passing order details (products purchased) is going to be a bit more complicated than inserting a simple variable.
It would require custom coding.
That is unless Microsoft was some clever way to piggyback off the google analytics gtag data that's already built into the cart.

Personally, I think most folks focus on google as they (by far) have cornered the market in search with 90%+ for years now.
https://www.statista.com/statistics/216573/worldwide-market-share-of-search-engines/
Now that's not an effort to dismiss bing, as they are next in line, rising above the other popular search engines, but it's still a far cry from Google as the link shows.

If you wanted to set this up, I believe it would need to be custom coded, so you might make a post in the developers forum, or reach out so one of these - https://www.ecommercetemplates.com/developers.asp

Thanks,
David
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000