开发者

Let sites know they were visited from WebView inside iOS App

开发者 https://www.devze.com 2023-02-16 02:38 出处:网络
I\'m trying to figure out the best way I can inform analytics trackers that the page view is coming from my app, rather than a \'direct visit\' (for example).

I'm trying to figure out the best way I can inform analytics trackers that the page view is coming from my app, rather than a 'direct visit' (for example).

I have an app that displays a list view of tons of different news stories, and I want to make it so that, when a user taps on one of the stories, and it is displayed in my UIWebView, the website being loaded is somehow informed that the referral came from 'example-iphone-app', or maybe my iPhone app's website?

Is there any way to manipulate the http request to make the iPhone app act as if the link is being opened by a referral link on my website?

I was originally thinking of just adding a query string with a parameter like ?source=myappname, but realized this is not a reliable (or even useful) way of alerting site owners with Goog开发者_如何学Pythonle Analytics, SiteMeter, Urchin, etc. from where the request has come.


If you're using Google Analytics then you can set the utm_source and utm_medium query parameters and they will be displayed as the referral source. utm_source is where you would put your myappname parameter and utm_medium should probably be set to referral unless you are charging per click then it is usually set to cpc.

0

精彩评论

暂无评论...
验证码 换一张
取 消