none
[UWP]How to send the campaign ID, when forming store protocol urls? RRS feed

  • Question

  • I bring my users from various store apps, to install a particular app, say abc. Now I want to track & get the statistics about the conversions, i.e. from which app, my abc app is installed more. How to do this? I could see a section in the developers dashboard - "App page views and conversions by campaign ID" where I could see the installations by campaign id. But how to send a campaign id manually, when forming the store protocol url?

    "ms-windows-store://pdp/?ProductId=abc"

    I guess, certainly there will be a way, since I am able to see the campaign id of adduplex there. as shown below.




    Saturday, August 10, 2019 2:19 PM

Answers

  • Hi,

    Yes, there is a way to do that. But the first thing is that you need to get the campaignID of the source app. Generally you could get that using the StoreContext class in the Windows.Services.Store namespace if you are targeting version 1607, or later. Then you could append append &cid=*my custom campaign ID* to the URL that you used to launch the app. For example, it looks like this:

    "ms-windows-store://pdp/?ProductId=abc&cid=custom\_campaign"

    For more information, please refer this document:Embed a custom campaign ID to your app's Microsoft Store page URL

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.




    Monday, August 12, 2019 2:25 AM
    Moderator

All replies

  • Hi,

    Yes, there is a way to do that. But the first thing is that you need to get the campaignID of the source app. Generally you could get that using the StoreContext class in the Windows.Services.Store namespace if you are targeting version 1607, or later. Then you could append append &cid=*my custom campaign ID* to the URL that you used to launch the app. For example, it looks like this:

    "ms-windows-store://pdp/?ProductId=abc&cid=custom\_campaign"

    For more information, please refer this document:Embed a custom campaign ID to your app's Microsoft Store page URL

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.




    Monday, August 12, 2019 2:25 AM
    Moderator
  • Please re-check. Since I am unable to find this "companyID of the source app"

    Is it different from Store_Id & custom_campaign_id ?



    • Edited by Bhadurudeen Monday, August 12, 2019 11:11 AM
    Monday, August 12, 2019 11:03 AM
  • Hi,

    I'm sorry that I've made a mistake. It should be campaignID not companyID. The document has already mentioned about how to get the campaignID , please check this part:Programmatically retrieve the custom campaign ID for an app. When you trying to launch abc from 'X' app, you need to attach X app's campaignID to the URL.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Tuesday, August 13, 2019 2:15 AM
    Moderator
  • Hi,

    I've updated my reply. Please check it.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 13, 2019 8:19 AM
    Moderator