Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long url breaks with GA plugin #11

Open
stpha6 opened this issue Nov 16, 2015 · 8 comments
Open

long url breaks with GA plugin #11

stpha6 opened this issue Nov 16, 2015 · 8 comments

Comments

@stpha6
Copy link

stpha6 commented Nov 16, 2015

I'm using your google analytics plugin for yourls, and I have one issue, not sure it can be worked around, but thought I'd put the issue out there to see if you have any ideas.

We use a system with long urls to point to our campus maps, the service uses a #! in their urls, and not in the conventional, standard use - which would be to denote an anchor tag. So what happens is, the ga code is placed in between the identifier and the #! which breaks the url in their system.

I'm using yourls 1.7 and your ga plugin vers 1.1

Example:

working long url: http://myatlascms.com/map/?id=287#!ct/12540?ce/12539?mc/43.116229999999995,-77.51191700000004?z/17

redirected url from yourls with ga plugin:
http://myatlascms.com/map/?utm_source=go.sjfc.edu&utm_medium=urlshortener&id=287

(it truncates at the #! and does not load the proper view in the map)

Once I turn off the ga plugin, redirection works again.

If not anything else, thanks for listening :) and thanks for all the great plugins.

@dgw
Copy link
Contributor

dgw commented Sep 15, 2016

Confirmed that this plugin appears to remove the URL fragment (# and everything following it) when redirecting. (This comment is also a test for GitHub support.)

Edit: Test (obviously) succeeded. Apologies for the noise.

@pred2k
Copy link

pred2k commented Feb 7, 2017

Dear @dgw, whats the status of this issue? I also stumbled over this problem. thanks in advance

@dagee3
Copy link

dagee3 commented Jan 25, 2018

Hello, for anybody still struggling with this I created this new fork that fixes this issue. https://github.com/dagee3/google-analytics-for-yourls

@tobozo
Copy link

tobozo commented Sep 12, 2018

@dagee3 thanks for this patch, however it messes up some URLs (those without the question mark)

I've managed to fix that in my version. Here's the PR.

BTW your repository doesn't seem to have the issue tracker enabled.

@dagee3
Copy link

dagee3 commented Sep 12, 2018

Hey @tobozo, I set up issue tracking now sorry about that. I just merged your pull request so if anyone else is struggling or finding issues you are more than welcome to open a issue on my fork and I will try to take care of it as soon as I am able. Also on a side note I have aplugin that complements this one and allows you to report on the utm code. It is found https://github.com/dagee3/UTM-Code-Reporting. Issue tracking is enabled for this and I am open to enhancements and fixes.

@tobozo
Copy link

tobozo commented Sep 12, 2018

yummy this UTM-Code-Reporting plugin sounds good I'll try that soon :+1

@zackkatz
Copy link
Member

@dagee3 @tobozo Please submit a PR back to this repo; I'm happy to merge. Thanks!

@TheDavidJohnson
Copy link

Recently ran across this issue with URL fragments being discarded (the # and everything after it). I haven't tested the fork that @dagee3 created. Any reason why those code changes wouldn't have been submitted back to this repo in a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants