davidduffett / dinheiro Goto Github PK
View Code? Open in Web Editor NEWASP.NET MVC Helpers for ecommerce applications
License: Other
ASP.NET MVC Helpers for ecommerce applications
License: Other
Provide a way to easily track onclick events by using the CSS class and HTML5 data- attributes.
A click could automatically be tracked just by adding a class to a link or button:
<a href="..." class="ga-event">This will be tracked</a>
In the case above, it would default to tracking "Link", "Click", "This will be tracked".
<a href="..." class=ga-event" data-event-category="Category" data-event-action="Click" data-event-label="My Link">This will be tracked</a>
The above would track "Category", "Click", "My Link".
Google is phasing out the current ga.js in favour of analytics.js (Universal Analytics). Tracking code is changing - tagging reference is here: https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs
The library will need to support both ga.js and analytics.js (which one is rendered can be specified using a static configuration property) - I should think ga.js will be the default for now until it is fully phased out.
When no label is provided for an event, it should be outputted as:
ga('send','event','Unsubscribe','Submit');
Or for asynchronous:
_gaq.push(['_trackEvent','Unsubscribe','Submit']);
Currently strings passed to variables are not JavaScript encoded, meaning Javascript errors happen when for example the name of an item in a transaction contains single quotes.
Ensure all strings are JavaScript encoded in the output.
When an event without a value is registered for Universal Analytics, the code being outputted is:
ga('send','event','Unsubscribe','Submit','',);
It should not have the comma before the bracket.
This causes a "Uncaught SyntaxError: Unexpected token )" JavaScript error.
Hi David,
Nice little tool. Though, you should use PostReleaseRequestState event instead of PreSendRequestHeaders to avoid possible heap corruption when using output caching. See https://blogs.msdn.microsoft.com/asiatech/2010/10/18/heap-corruption-in-httpcachemodule-while-you-try-to-remove-http-headers-in-your-custom-http-module/
Currently when tracking transactions in Google Analytics, just the amount is passed and the currency inferred by the Google Analytics account.
Change so that a single site can charge in multiple currencies by adding a SetCurrencyCode method which can be called when transactions are tracked.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.