Comments (3)
For some reason after the code is minified in the return clause there is a missing condition. Before minification the code is
return action &&
action.indexOf("http") === 0 &&
action.indexOf(location.hostname)<0;
and after minification the code is:
var e=t.getAttribute("action");return 0===e.indexOf("http")&&e.indexOf(location.hostname)<0
That's why maybe it's a good idea to put the missing condition in assigning the value, e.g.
var action = form.getAttribute("action") || "";
from autotrack.
Something must be wrong with your setup because this case is definitely already being considered and tested.
Here is the relevant text fixture, and here's the test. Note that the autotrack tests run in all browsers, so the IE and FF cases are covered.
By the way, the minified code you're showing above is not correct. I've copied this straight out of the autotrack.js version 0.6.4 file and it's different from what you've pasted above:
n.prototype.shouldTrackOutboundForm=function(t){var e=t.getAttribute("action");return e&&0===e.indexOf("http")&&e.indexOf(location.hostname)<0}
Is it possible the minified code you're looking at is from an older version?
from autotrack.
sorry about that, you're right, my version is /*! autotrack.js v0.5.0 */ ... I've added it recently just I'm not sure how I got an old version.
BR
Galin
from autotrack.
Related Issues (20)
- hover event for eventTracker?
- Move dependencies to devDependencies HOT 1
- Is this the way to implement stepped scroll tracking?
- command not found: autotrack HOT 2
- cleanUrlTracker temperamental
- Twitter restablecer
- Support for VueJS and NuxtJS?
- Ecommerce Plugin
- hash tracker
- Library no longer maintained - what now? HOT 2
- Fff
- Send custom metrics with autotracking?
- Test
- Google analytics tracking doesn't require URL request to track a local R Shiny app HOT 1
- Failed to execute 'unobserve' on 'IntersectionObserver': parameter 1 is not of type 'Element'.
- Ahmed X
- Xx
- isssue
- Muhammad ata Shobi
- Muhammad ata shobi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autotrack.