${badge('npm')} ${badge('npm-license')}
A Unified analytics API
${badge('nodei')}
Providers:
- Google Analytics
- Google Remarketing Tag
- Mixpanel
- Facebook pixel
- Twitter pixel
- Pinterest pixel
- Reddit pixel
- LinkedIn Insight Tag
- Hotjar
- REST endpoint
Features:
- Unified API
- Landen.io Integration
- React context provider
npm install --save ${pkg.name}
or
yarn add ${pkg.name}
import Multicat from '${pkg.name}'
const multicatConfig = {
google_analytics: <GOOGLE_ANALYTICS_ID>,
google_remarketing: <GOOGLE_REMARKETING_TAG>,
mixpanel: <MIXPANEL_ID>,
hotjar: <HOTJAR_ID>,
facebook_pixel: <FACEBOOK_PIXEL_ID>,
twitter_pixel: <TWITTER_ID>,
pinterest_pixel: <PINTEREST_ID>,
reddit_pixel_q: <REDDIT_PIXEL_Q>,
reddit_pixel_s: <REDDIT_PIXEL_S>,
linkedin: <LINKEDIN_PARTNER_ID>,
rest_endpoint: <REST_ENDPOINT>,
}
const multicat = new Multicat(multicatConfig)
multicat.event(`MY_EVENT`, {me: 'ta', da: 'ta'})
multicat.view('/thank-you.html')
<!-- Include the script -->
<script src='https://unpkg.com/${pkg.name}@${pkg.version}/build/web.js'></script>
<script>
// Specify your analytics IDs
var multicatConfig = {
google_analytics: 'GOOGLE_ANALYTICS_ID',
mixpanel: 'MIXPANEL_ID',
facebook_pixel: 'FACEBOOK_PIXEL_ID'
}
// Initialize Multicat
var multicat = new Multicat(multicatConfig);
// Run any page view
multicat.view('/thank-you.html');
// Attach listeners to things
var button = document.getElementById('submitButton');
button.addEventListener('click', function(ev) {
// Broadcast custom events in response to user actions
multicat.event(`MY_EVENT`, {me: 'ta', da: 'ta'});
});
</script>
Drop in version for Landen: packages/multicat-landen
Context provider for React: packages/multicat-react
See the packages/multicat/README.md for more info.
${pkg.license} © ${pkg.author.name}
You can find more tools like this on the Cofab website.