I have a landing page which embedded in many websites. It's role is to collect users data. I want to track these data to know from where each user come?
how can I do this tracking using PHP ?
There are Multiple ways to Check From which source user has submitted data. This is basically used in Analytics Platforms to gather statstics. Below are few of them
1) Put Google Analytics Code in the Landing page which is further embeded in to other sites. Later on Google Analytics Report you will be trace it. Also you will get other usefull reports too.
2) customised way - Fully under your control
A) Distribute your landing page in a way so every other site which embed your page get Unique Code and When submit the data you will get back that source along with other data this way you will be able to build your own tool
B) using $_SERVER['HTTP_REFERER'] to trace the routed page from anywhere along with appropriate query string
Other ways include throguh Javascript you can pass XHR request on load of your iframe but that will be complicated way if you can handle it properly than only go for it.
Related
Please read the question carefully before you answer as it is a bit confusing.
I recently saw that Pagemodo gives the option to have multiple tabs on a single page as many times as you want which they call as "UNLIMITED TABS" in their plan options. So this means that if we want multiple welcome tabs on a page that can be done. Technically you can create only one page tab with one application. To have multiple tabs you will need multiple apps.
Now the question is how is it possible?
Even if i have multiple apps, while showing the page tab i can fetch the data about the tab from a db using "page id" as this is the only thing i have in the signed request. How do they get to know which page it is (ok we can get it from signed request) and which app it is out of those multiple apps that were created so that they render data accordingly?
Be careful your not falling for marketing speak.
Pagemodo likely manages a defined number of apps (which may be a very large number) and is allowing you to install them onto any page you manage giving you in essence unlimited uses.
The backend is all managed via end points for each of the apps and the signed request.
I found how it may be possible.
This is a nice place to get an idea of the problem i came up with:
http://forum.developers.facebook.net/viewtopic.php?id=90792
After thinking about it i came up with the following solution that though you do not have a way to get the application id till you are not authenticated using signed request or any other data provided by facebook. But you can still get it via the page tab url.
So if i have an app with tab url as: http://www.example.com/tab.php, we can pass the app id via http://www.example.com/tab.php?id=APPID
Solves the purpose pretty well.
I was wondering if it was possible to have two or more sets of Google Analytics tracking codes on one page. There's going to be a single webpage that is accessible through either normal methods (desktop or mobile browser), or accessed through scanning the QR code on the product packaging and being redirected that way.
The client wants three things tracked:
Analytics for the full page (all methods of connection)
Analytics for just those connected via normal methods
Analytics for those connected via QR code
I have already developed a means of differentiating the connection method, and switching the Google provided Javascript for 2 and 3.
So is this possible, to have two analytics codes on one page? I have checked all over, can't find an answer that is to the point.
Thanks in advance
A single analytics will report browser and OS used and the origin of traffic. Hence, there's no reason to use three cookies, three JS files when you can just generate a personalized report with the data you need
Don't use different trackers for this, use custom variables. Splitting it up loses you valuable insight into how different use cases navigate the site.
If anyone is ever looking for this:
http://www.publicinsite.com/qr-codes-google-analytics-track-mobile-devices/
That;s the best bet I think
I had a potential client ask me if I can prevent a user navigating away from their website within an iPad app? So I would need to load the client site within a web view and somehow disable invalid links i.e. banners and promotional links.
I am wondering if there is a way to catch the link that has been touched within the view before it is loaded.
If there is no way to do this, is there away to strip a web page of invalid links before it is loaded into the web view?
Use UIWebViewDelegate method webView:shouldStartLoadWithRequest:navigationType:. It's called when user taps a link. Return NO if you don't want to handle any links or YES if you want your web view to handle the request. More info in Apple docs.
A nice thing is to filter out some requests and handle them yourself based on e.g. URL-scheme of the request or based on UIWebViewNavigationType value. Note: for a filtered requests that you handle, you still return NO.
I'm building an application, and I'd like to incorporate some stat tracking for each of the pages created. However, these pages are simply redirect pages using header() to different places, depending on what conditions have been met.
Rather then build my own stat tracking platform and incorporate it within PHP, I'd rather send traffic data to the Google Analytics platform. However, as the page exits via a header() alteration, I cannot print the normal Javascript code.
Is there anyway I can still have the page and query string traffic data sent to Google Analytics without using the standard script?
User's browser must make a request to Google's 1-pixel "tracking gif". There is google's solution for mobile web sites, where Javascript is not available. You can see it in the tracking code section of your google analytics settings pages. It is written for PHP. However, this pure-PHP solution just inserts <img> tag into the output. It won't work for you, since you're just making a redirect with HTTP headers.
So, there could be two solutions:
Make the redirect via META tag. Thus, you'll be able to track the redirect with either Javascript or PHP-based analytics code.
Try to fetch that 1x1 GIF from google server-side. However, this will screw lots of things in your Analytics. E.g. originating IP will be wrong, so all demographics will be wrong, you won't be able to pass cookies, etc. It will be most rudimentary tracking at best.
There's an official Google's PHP class "Server-Side Google Analytics PHP Client"
https://code.google.com/p/php-ga/
I am creating a custom reporting website, where I want to show live data from google analytics and accordingly the data in my website will change. I want it to be automated and dynamic, like whenever the data changes in GA, i want it to be automatically changed in our website, which will be shown to our clients to show the performance of our websites.
I am guessing this can be achieved by some api calling from php, xml returned values and showing those data on our website along with images.
i would appreciate if anyone could give me more info on how to start working on this.
Google Analytics has an official API. They don't seem to have ready-made PHP examples, but the XML sources should be easy to query. Not sure how "live" GA's data is, though - it could be that it is not possible to do stuff live tracking of visitors.