Reputation: 63
I'm working on an email, and the writer wants the link to go directly to a video on a page. This video is in a tab, and lower on the page.
I set up an anchor to go to the video, but once Universal Analytics tracking has been added to the URL, the anchor link no longer works.
Works:
<a href="http://www.foo.com/page-name/?tabset0=1#anchor-name">Link Text</a>
Loads Page Without Going to Anchor:
<a href="http://www.foo.com/page-name/?tabset0=1#anchor-name&utm_source=foo-source&utm_medium=foo-medium&utm_content=foo-content&utm_campaign=foo-campaign">Link Text</a>
Is there anything I can do to get the anchor link to work properly?
Upvotes: 0
Views: 99
Reputation: 2369
I think the URL is a bit malformed in the second example (it may work but it's not what you mean to be accessing necessarily)
Try using:
http://www.foo.com/page-name/?tabset0=1&utm_source=foo-source&utm_medium=foo-medium&utm_content=foo-content&utm_campaign=foo-campaign#anchor-name
Fragment identifiers / anchor (as you refer to it) are supposed to be given at the end (the very end) of the address-- if you put it in the middle of the query it won't be passed correctly. In fact, fragment identifiers aren't given to the server. Only the client gets those... the CGI query is definitely given to the server.
Here's some more info: https://en.wikipedia.org/wiki/Fragment_identifier
Upvotes: 1