Giter Site home page Giter Site logo

fresh-url's People

Contributors

bitdeli-chef avatar bschwartz avatar maxpower15 avatar mortonfox avatar mrdavidjcole avatar timse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fresh-url's Issues

Issue with Fresh URL & HubSpot

Hello,

I am using the Wistia Fresh URL on our HubSpot hosted website but it seems to be interfering with the HubSpot analytics. Is there any way of checking for definite whether or not it is interfering? And is there any way to solve it?

I have used to following script to ensure it waits for HubSpot to read the UTM parameters but it doesn't seem to make any difference.

<script> var _freshenUrlAfter = ['googleAnalytics', 'hubspot']; </script> <script src="//fast.wistia.net/labs/fresh-url/v1.js" async></script>

Be glad if you could help...
Gavin

Fresh URL tool doesn't work with GTM-Tag Events

Hello,

Thanks for the fresh URL tool. The script delete the UTM tag perfectly well. Unfortunately, I noticed something now. When I place for example banner ads, the visitor lands on the landing page. The UTM tag overright the original referral (UTM example: Source: welt.de, Medium: banner), registered by Analytics and hidden by Refresher. If I now trigger an event that I track via the GTM, the UTM tag will be overwritten and replaced with the original referrer (Original referral: Source: welt.de, Medium: referral). As soon as I disable the UTM refresher, everything works.
Have you ever had such a thing? Thanks for your support.

Best regards
Nino

Add to NPM Registry

It would be great if this package were added to the NPM registry so it could be easily included in Webpack bundles.

Thanks!

Issue with Twitter Ads

Hi,

This is a bit of a random one, but basically there seems to be an issue with Fresh URL not waiting for a couple of analytics scripts to load (namely HubSpot). However, this is only occurring with Twitter ads links - it's not proving an issue anywhere else. So, in HubSpot, new leads coming from Twitter ads are being marked as direct traffic rather than Twitter.

I can't work out why this could be - any ideas?

Happy to clarify further if need be.

Thanks.

UTM Paramaters won't clear if after a hashtag

Our site is set up to mainurl.com/#childpage

but when the utm parameters show up after the # sign it won't clear.

Ideally if url is like this mainurl.com#childsite?utm_medium=source

the utm parameters would be cleared.

Browser extension?

More than cleaning my website urls I would like to clean every other links on the interweb. Do you believe that is plausible to turn this functionality into a browser extension?
I would definitely want to have that on my browser. My eyes would be thankful.

dataLayer.push with a function

So what I read from this code, a callback function needs to be added to the dataLayer array. It seems like this callback function is supposed to be called from GA at some time.

The problem is, that function is never called. And I cannot find any references on the web that mention adding a function to that array. Everybody just puts objects in there, with keys and some values.

So none of my script runs in the first place. Can you please explain how this thing starts? I'm only interested in Google Analytics with analytics.js, nothing else.

Here's my code:

window.dataLayer = window.dataLayer || [];
function removeUtmParams() {
	console.log("removeUtmParams called");
	// Only do this if the browser supports changing the URL of the page
	if (window.history.replaceState) {
		// Wait for the analytics library to be loaded, or the timeout
		let retries = 200;
		let pollInterval;
		pollInterval = setInterval(function () {
			if (retries-- < 0 || window[window.GoogleAnalyticsObject]) {
				clearInterval(pollInterval);
				// Then push a function onto its queue
				console.log("polling completed, retries:", retries);
				window[window.GoogleAnalyticsObject](function () {
					console.log("cleaning URL");
					// Now the tracking is done, clean up the URL
					let cleanSearch = window.location.search.
						replace(/utm_[^&]+&?/g, "").
						replace(/&$/, "").
						replace(/^\?$/, "");
					let cleanUrl = window.location.pathname + cleanSearch + window.location.hash;
					window.history.replaceState(window.history.state, "", cleanUrl);
				});
			}
		}, 50);
	}
}
function gtag() {
	dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "UA-.....", { "anonymize_ip": true });
console.log("pushing to dataLayer");
gtag(removeUtmParams);

The log says "pushing to dataLayer" and nothing else. The URL is untouched. The page view is tracked in the realtime view.

PS: When I call removeUtmParams directly instead of adding it to the array, it runs to completion, cleans the URL, but I can't see the source value in the realtime reports. But then again, I can't even see the source in the report when I don't clean up the URL. Strange.

Support for Matomo analytics

Any chance of supporting Matomo analytics (formerly Piwik)?

Or can anyone share a way of adding in a custom trigger for this?

Usage with Tag Manager

There seems to be an issue running this with tag manager.

Pardot seems to function just fine.

script seems not waiting for GTM scripts

Hi,
I found your script and I like it, so I tried to use it on our company website. It works fine, but we have noticed that Google Analytics is counting only about 60% of url utm parameters, so I had to put it away. We are inserting analytics code via Tag Manager. I have read whole readme, but didn't find what could be wrong. Do you have any clue?
Thanks

Create an onReady callback

Cleaning up utm_*, wkey, and wemail is nice, but something you want to scrub other params. If we expose a ready callback for after FreshURL has done its stuff, it would be trivial for a user to do more scrubbing.

Unable to get script working for Google Analytics

Hello,

Is Fresh URL still active and working? I've used it in the past for a couple sites and now I'm having trouble getting it working on a new website. Does anyone have an update or any feedback? Any help would be appreciated.

Thanks!

Support Drip

Drip uses a URL parameter in its email links: __s=abcd3et6spmh2s3io7xy. The user also includes a drip.js file. I've noticed that Drip automatically cleans up the URL parameter under most circumstances, but I can see in my logs that it isn't always removed. I suspect this may be because the drip.js script is blocked.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.