Reputation: 102
Is there a way to track when user visits our page from social media like facebook, twitter or pinterest?
is there a way to add some parameters to the url so that it will be easier to track?
Upvotes: -1
Views: 296
Reputation: 146
Yes, there is.
Google's Campaign URL Builder is just what you need to add parameters and values to your URL and then easily track them using your Google Analytics platform. You can give your campaign an ID, a name, define a medium and even put in there a slogan/promo code, etc.
Then after you have created your link, post it in the social media you have defined for it and track it via the Google Analytics platform.
Upvotes: 0
Reputation: 2121
<?php
echo $_SERVER['HTTP_REFERER'];
?>
This tiny php script enables you to know from where the user came from.
EDITS
As nyshangal asked for jsp code
JSP
request.getHeader("Referer");
I am not good at JSP. After googling I found that this above code will return the referrer from where the user came from.
Thank you
Upvotes: 2