Find and Use the URID for ASP
“mm_urid” is used in the examples below. If you have defined your own variable, please change ALL “mm_urid” references to the variable name you selected when setting up the click URL.
You must replace the default Goal ID (“12345”) with the App Tracking ID given to you by your Account Manager or when you registered on mMedia.
Don’t have an App Tracking ID? Do one of the following:
- Go to mmedia.com to set up an App Tracking ID by following these instructions.
- Contact your Account Manager or contact us to get an App Tracking ID.
Step 1: Add the following code inside the header of each page that is a part of the conversion process.
... <% dim urid urid=Request.QueryString("mm_urid") if urid="" then urid=Request.Form("mm_urid") if urid="" then urid="No URID" %> ...
Step 2: Append the following string to the end of any link that is, or links to, a page that is a part of the conversion process.
This will ensure that the URID value follows the user throughout the conversion process.
... <a href="thankyou.asp?mm_urid=<%Response.Write(urid)%>" >Submit Conversion</a> ...
Step 3: On the final page of the conversion, place the following code.
Steps 1 and 2 make sure that the URID variable follows the user to this final page and is available.
This code will grab the URID from the URL string and populate it within the the API call.
Once complete, it will automatically submit the conversion event to Millennial Media’s Conversion Tracking API.
... <% 'Conversion Tracking Start dim goalID, urid, tracking, request, response goalID = 12345 urid = Request.QueryString("mm_urid") if urid="" then urid = Request.Form("mm_urid") if urid="" then urid = "No URID" urid = Server.URLEncode(urid) tracking = "http://cvt.mydas.mobi/handleConversion?goalid=" & goalID & "&urid=" & urid request = WebRequest.Create( tracking ); response = request.GetResponse(); 'Conversion Tracking End %> ...