All Projects → ingestly → ingestly-client-javascript

ingestly / ingestly-client-javascript

Licence: MIT license
Ingestly Client JavaScript SDK for modern web analytics.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to ingestly-client-javascript

Magento2 Google Tag Manager
Google Tag Manager is a user-friendly, yet powerful and cost-effective solution that is a must-have integration for every Magento store. It simplifies the process of adding and managing third-party JavaScript tags. With dozens of custom events and hundreds of data points our extensions the #1 GTM solution for Magento.
Stars: ✭ 208 (+845.45%)
Mutual labels:  web-analytics
trackingco.de
minimal and loginless web analytics
Stars: ✭ 32 (+45.45%)
Mutual labels:  web-analytics
app-designer
A design environment for creating, customizing, and previewing your forms, data curation, and visualization applications.
Stars: ✭ 27 (+22.73%)
Mutual labels:  data-collection
Matomo
Liberating Web Analytics. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. We love Pull Requests!
Stars: ✭ 15,711 (+71313.64%)
Mutual labels:  web-analytics
gtm-guidelines
A collection of best practices for your daily Google Tag Manager routine
Stars: ✭ 39 (+77.27%)
Mutual labels:  web-analytics
vue-analytics-facebook-pixel
A small wrapper around Facebook Pixel API
Stars: ✭ 23 (+4.55%)
Mutual labels:  web-analytics
Countly Sdk Web
Countly Product Analytics SDK for websites and web applications
Stars: ✭ 165 (+650%)
Mutual labels:  web-analytics
briefcase
ODK Briefcase is a Java application for fetching and pushing forms and their contents. It helps make billions of data points from ODK portable. Contribute and make the world a better place! ✨💼✨
Stars: ✭ 62 (+181.82%)
Mutual labels:  data-collection
privera
Use the tools you know. Respect users' privacy. Forget cookie consents. Comply with GDPR, ePrivacy, COPPA, CalOPPA, PECR, PIPEDA, CASL; you name it.
Stars: ✭ 23 (+4.55%)
Mutual labels:  web-analytics
LinkedIn-Scraper
A LinkedIn Scraper to scrape up to 10k LinkedIn profiles from company profile links and save their e-mail addresses if available!
Stars: ✭ 62 (+181.82%)
Mutual labels:  digital-marketing
central-frontend
Vue.js based frontend for ODK Central
Stars: ✭ 24 (+9.09%)
Mutual labels:  data-collection
timeonsite
Timeonsitetracker.js - Modern & accurate "Time on site" tracking for web and mobile browsers
Stars: ✭ 51 (+131.82%)
Mutual labels:  web-analytics
zdh web
大数据采集,抽取平台
Stars: ✭ 292 (+1227.27%)
Mutual labels:  data-collection
Centcount Analytics
An open-source web analytics software. Developed by using PHP + MySQL + Redis, Can be easily deployed on your own server, 100% data ownership.
Stars: ✭ 249 (+1031.82%)
Mutual labels:  web-analytics
ibge
🌎 Data collection of geographical divisions of Brazil by IBGE (https://servicodados.ibge.gov.br/api/docs)
Stars: ✭ 28 (+27.27%)
Mutual labels:  data-collection
Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+63972.73%)
Mutual labels:  web-analytics
shifting
A privacy-focused list of alternatives to mainstream services to help the competition.
Stars: ✭ 31 (+40.91%)
Mutual labels:  data-collection
ngx-matomo
Matomo (aka. Piwik) web analytics for Angular applications
Stars: ✭ 83 (+277.27%)
Mutual labels:  web-analytics
coletores
Coletores de dados sobre remunerações do sistema de justiça brasileiro
Stars: ✭ 18 (-18.18%)
Mutual labels:  data-collection
akvo-flow
A data collection and monitoring tool that works anywhere.
Stars: ✭ 67 (+204.55%)
Mutual labels:  data-collection

Ingestly JavaScript Client

Japanese Document available here / 日本語ドキュメントはこちら

What's Ingestly?

Ingestly is a simple tool for ingesting beacons to Google BigQuery. Digital Marketers and Front-end Developers often want to measure user's activities on their service without limitations and/or sampling, in real-time, having ownership of data, within reasonable cost. There are huge variety of web analytics tools in the market but those tools are expensive, large footprint, less flexibility, fixed UI, and you will be forced to use SDKs including legacy technologies like document.write.

Ingestly is focusing on Data Ingestion from the front-end to Google BigQuery by leveraging Fastly's features. Also, Ingestly can be implemented seamlessly into your existing web site with in the same Fastly service, so you can own your analytics solution and ITP does not matter.

Ingestly provides:

  • Completely server-less. Fastly and Google manages all of your infrastructure for Ingestly. No maintenance resource required.
  • Near real-time data in Google BigQuery. You can get the latest data in less than seconds just after user's activity.
  • Fastest response time for beacons. The endpoint is Fastly's global edge nodes, no backend, response is HTTP 204 and SDK uses ASYNC request.
  • Direct ingestion into Google BigQuery. You don't need to configure any complicated integrations, no need to export/import by batches.
  • Easy to start. You can start using Ingestly within 2 minutes for free if you already have a trial account on Fastly and GCP.
  • WebKit's ITP friendly. The endpoint issues 1st party cookie with secure flags.

Implementation

Prerequisites

  • Ingestly Endpoint must be in operation.

  • If you want to use the pre-build SDK, you can use files piblished in GitHub Releases.

  • If you wish to build the SDK by yourself, node.js is required.

  • This endpoint may use cookies named ingestlyId, ingestlySes and ingestlyConsent under your specified domain name.

Build the SDK

# Install required node_modules (only for build process. no dependencies.)
npm install

# ESLINT under ./src
npm run lint

# Build the SDK into ./dist
npm run build

Install to your website

Configuration

  1. Open ./dist/page_code.js
  2. Change configuration variables between line 7 and 44:
    • endpoint : a hostname of Ingestly Endpoint you provisioned.
    • apiKey : an API key for the endpoint. This value must be listed as true in Fastly's Custom VCL for Ingestly.
    • eventName : the SDK dispatches a recurring event based on a timing of requestAnimationFrame. You can specify a name of this event.
    • eventFrequency : the recurring event is throttled by this interval in millisecond. Set a small number if you want to make the SDK sensitive.
    • targetWindow : a property name of target window. you can use self, parent or top.
    • useCookie : a default mode of device identification by Cookie. Set true to enable, set false to disable.
  3. Save the file.

Note: If you remove eventName and/or eventFrequency, or set 0 for eventFrequency, the recurring event will be disabled.

Place .js files

  1. Upload a core library ingestly.js and a config file page_code.js to your web site.
  2. Add <script> tags into all pages like the below to fire Ingestly Tracking method.
<script src="./dist/ingestly.js"></script>
<script src="./dist/page_code.js"></script>

Options

You can enable optional tracking features.

Real User Monitoring

  • You can measure the Real User Monitoring data which is the performance information based on timeline of page loading on each client.
  • In config(), set true for options.rum.enable.

Time-spent on a page (unload)

  • Unload tracking set an eventListener to one of available events when the page is being unloaded.
  • You can get an exact time that user spent during the specific pageview.
  • In config(), set true for options.unload.enable.

Click Tracking

  • Click tracking is triggered if the clicked element (or its parent) has the specified data-* attribution.
  • If you omit options.clicks.targetAttr but options.clicks.enable is true, Click tracking will measure clicks on elements without data-* attribution.
  • In config(), set true for options.clicks.enable and adjust values:
variable example description
targetAttr data-trackable attribution name for identifying the target element
  • If you set data-trackable for targetAttr, you need to add data-trackable attribution to every element you want to track clicks.
  • Ideally, every block elements should be structured like hierarchy. and each block element should have data-trackable with meaningful value.

Scroll Depth

  • Scroll depth tracking for both fixed page and infinity scroll (lazy-load) page.
  • In config(), set true for options.scroll.enable and adjust values:
variable example description
threshold 2 track the depth when the user stay at/over X percent/pixels for more than T seconds specified here
granularity 20 track the depth every X percent/pixels increased
unit percent for the fixed height page, you can use percent. If the page is infinity scroll, use pixels instead

Read-Through Rate

  • Read-Through Rate means is a metrics that describes how much range of content is consumed by an user.
  • In config(), set true for options.read.enable and adjust values:
variable example description
threshold 4 track the depth of content when the user stay at/over X percent
granularity 10 track the rate every X percent increased
targets document.getElementsByTagName('article') An array of elements. (nodeList or array) specify block elements to observed as a target of read-through.

Media Tracking

  • Once you enabled this option, all media which is VIDEO or AUDIO will be tracked automatically.
  • This option supports play, pause and eneded events plus the heart-beat.
  • In config(), set true for options.media.enable and adjust values:
variable example description
heartbeat 5 the heart-beat tracker will be dispatched every X sec defined here

Form Analysis

  • Form Analysis provides a statistics info regarding the form completion but not values of form fields.
  • This feature accepts multiple forms by passing a list of target element of forms.
  • In config(), set true for options.form.enable and adjust values:
variable example description
targets document.getElementsByTagName('form') A list of form elements.

API instructions

  • Basically, SDK uses a global namespace Ingestly.
  • A custom event ingestlyRecurringEvent (or your specified name in config()) can be used for observing elements repeatedly.

Ingestly.config(config)

  • A method for configuration. See Configuration and Options section in this page.

Ingestly.init(dataModel)

  • Initialization for the page.
  • The method defines the page level variables such as page URL, title, referrer, etc...
  • If your web site is SPA, you should call this method on each page update.
  • A parameter dataModel must be an object. You can add custom variables if you define BigQuery's schema and Log Format for Fastly.

Ingestly.trackPage(eventContext)

  • Send a beacon for pageview event.
  • You can pass the custom variables, or you can overwrite variables you passed at Init().

Ingestly.trackAction(action, category, eventContext)

  • Send a custom beacon on your preferred events.

Ingestly.setConsent(acceptance)

  • Save the acceptance status for purpose of data use such as "cookie", "measurement", "analytics" or any other your own categorization.
  • If you set cookie as Boolean type, you can control the SDK to use Cookie or not per a browser.
  • If you set false to measurement, the SDK will not send beacons.
  • Values will be set as a Cookie by the endpoint.
key description
cookie reserved for Cookie control.
measurement reserved to enable/disable data transmission.
analytics
personalization
advertisement
sharing

Ingestly.getQueryVal(keyName)

  • This method retrieves a value from GET parameter of URL by specifying a key name.
  • If the URL does not have a key-value pair for specified key name, the method returns an empty string ''.
  • Note that this method does not parse the URL each time. An object containing the parsed key-value pairs based on URL is generated on init(), and the method just returns the value from the object. So, if your SPA updates URL parameter, and you want to use it for measurement, you need to call init() or do not use this method.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].