In my email inbox I got URL(http://localhost/sample.aspx) of a website when I click on this link this website open in browser.
Now I have to track on sample.aspx that this website coming from link clicked in email through JavaScript.
How can I track that.
For example using document.referrer we can track last visited website URL.
Thanks
The only mechanism you have for this would be to add a parameter to the querystring, so something like http://localhost/sample.aspx?emailClicked=true
You can then read this on the web site using JavaScript (or anything else for that matter) and track it as you see fit.
You cannot use Document.referrer. Because nothing referrered this link (in the case of outlook for example) or if it did (for example gmail, etc.) you don't know what the URL(s) of the hundreds of referrer's would be.
Related
We have a partner site (partner-example.com) with a product that uses Flash. We have a page on our own website (example.com) which sends the user there when they press a button.
I'd like to try to find out if the browser is going to actually let them use that other site, ie if they have Flash enabled for that site, before sending them there, so I can show an extra message saying "Please note - it looks like Flash is currently not enabled for our partner site - you will need to have Flash enabled for "partner-example.com".
Is this possible?
this is possible - you can use several Libs to do that ... e.g SWF Object or this one: http://www.featureblend.com/javascript-flash-detection-library.html
It is not necessary to test it for another website ;) if the client is able to see flash content on your site - he is able to see it everywhere.
so i have kind of a strange problem, I am in the process of building my own tweet button which is simple enough just using a link that resembles this <a href="https://twitter.com/intent/tweet?text=YOUR-TITLE&url=YOUR-URL&via=TWITTER-HANDLE">
now this as a link works just fine even with the dumby data prvided the problem is i would really like this page to open in an iframe on my site.. but twitter and other social networks have disabled this capability I am woundering if anyone know's a way i can use some sort of iframe or other tech including I assume an oauth and api which will alow me to send write, and display a tweet that the user can send inside my sight ?
as just using this returns an empty frame
<iframe src="http://twitter.com/intent/tweet?text=YOUR-TITLE&url=YOUR-URL&via=TWITTER-HANDLE">
</iframe>
anyhelp on how or even if I can do this or even a site I can check out that allows me as a user to do this would be greatly appreciated
(just a note I dont wish to tweet on a user behalf but rather display a pre defined text's tweet that enable the user to send without leaving my site or opening a new window )
Seems like it's against their terms of service. I'm researching the same issue now and it looks like you need to setup 0Auth to get an access token and then use the API. I'll report back when I have the full answer.
I have the next task - I have a page where we have some interaction logic:
After a user clicks a button, my script redirects the user to another site where it must be populate 2 textfields then click button, after redirect to new page it must click on another button.
My project is based on ASP.NET MVC4.
My questions are:
May I do all of this?
If yes, how can I redirect to another page and run my script
P.S.: Second web site isn't my site and everything I know is id of buttons where I need to click.
Elaborating on my comment
You cannot do this in a normal browser. You could write a bookmarklet or two that would navigate and click but there is no script you can write in a web page that will do what you want for security reasons. A long time ago, it was possible in IE to load a banking site into an iFrame and script and monitor user interaction to steal credentials. This has been blocked.
If you save an HTML page with the extension HTA, it can be loaded from harddisk in windows and will have relaxed security so you could load the other site into an iFrame and script the interaction. This is likely not what you want.
The last method is to use for example CURL to get the foreign page, insert stuff and submit the form to the foreign site and return the result. This is not recommended either.
So the question to you is: Why do you need this and are there other ways to do what you want
1) location.href = "http://another.page.com"
2) impossible for security purposes
I was wondering how would i go about adding a simple tracking to a certain link on a site I am developing for a client
I am using google analytics for tracking the source of the incoming traffic and after the visitor has entered the site he supposed to click on a link, I an interested in knowing how many clicks I got from every source.
You're looking for "Campaigns". There's an extensive article about it here: http://support.google.com/analytics/bin/answer.py?hl=en&answer=1239239
You can use the "URL Builder" tool to create a URL for a specific link (on an external site, presumably) by giving a name to your campaign and other details. The parameters are utm_source, utm_medium, and utm_campaign in particular.
I'll mention that Analytics will already tell you (without any modification to the link) what referring page sent a visitor, so you can tell what page a visitor was viewing before arriving at your site. All this is found under "Traffic Sources" in the Analytics reporting interface. The utility of campaigns is if either (a) you'll be scattering links in ads on many different websites, and it's the ad rather than the page that you want to track, or (b) there may be multiple links to your site on the same page and you want to know which one the visitor clicked.
Is it possible somehow to find out if an external email client has actually been opened when a user clicks on a mailto link on a web page? I need to know that in my javascript code.
The reason I need to know this, is because users might not have any email clients set up on their machines, and they would wonder why doesn't anything happen when they press on the "Send an Email" button.
JavaScript has no access to anything outside the browser. Because of this, there is no way to check the results of clicking a mailto link.
Whatever happens if a mailto link is clicked is up to the clients browser.
Maybe there is some hack to archive what you want, but no standard compliment solution.