Countly Web SDK: Track site accesses and errors the Countly API

Recommend this page to a friend!
  Info   Documentation   View files Files   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-11-13 (7 days ago) RSS 2.0 feedNot enough user ratingsTotal: 85 All time: 446 This week: 3Up
Version License JavaScript version Categories
countly-web-sdk 1.0Custom (specified...1.0AJAX, Web services
Collaborate with this project 

Author

Countly Web SDK - github.com

Description

This package track site accesses and errors the Countly API.

It can track several types of statistics and events like user sessions, clicks, form submissions, and JavaScript errors.

The events are reported to the Countly server using AJAX requests that can be sent synchronously or asynchronously to avoid page loading delays.

Innovation Award
JavaScript Programming Innovation award winner
August 2015
Winner
Countly is a service that can track several types of user access statistics and action events the users perform on pages.

This package uses the Country API to record useful information for the developer about important events like clicks on the page, form submissions or even JavaScript errors.

Manuel Lemos
Picture of Arturs Sosins
  Performance   Level  
Name: Arturs Sosins <contact>
Classes: 51 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 8x

Winner: 6x

Documentation

<html> <head> <!-- Page styling here --> <link rel='stylesheet' type='text/css' href='./style/style.css'> <!--Countly script--> <script type='text/javascript' src='../lib/countly.js'></script> <script type='text/javascript'> //initializing countly with params const COUNTLY_SERVER_KEY = "https://your.server.ly"; const COUNTLY_APP_KEY = "YOUR_APP_KEY"; if (COUNTLY_APP_KEY === "YOUR_APP_KEY" || COUNTLY_SERVER_KEY === "https://your.server.ly") { console.warn("Please do not use default set of app key and server url") } // initializing countly with params Countly.init({ app_key: COUNTLY_APP_KEY, url: COUNTLY_SERVER_KEY, //your server goes here debug: true }); //track sessions automatically Countly.track_sessions(); //track pageviews automatically Countly.track_pageview(); //track any clicks to webpages automatically Countly.track_clicks(); //track link clicks automatically Countly.track_links(); //track form submissions automatically Countly.track_forms(); //track javascript errors Countly.track_errors({ jquery: "1.10", jqueryui: "1.10" }); //let's cause some errors function cause_error() { undefined_function(); } function unhandled_error() { Countly.add_log('Pressed unhandled button'); cause_error(); } function handled_error() { Countly.add_log('Pressed handled button'); try { cause_error(); } catch (err) { Countly.log_error(err) } } </script> </head> <body> <!-- Header, banner etc. Top part of your site --> <div id="header"> <h1>Error Helpers</h1> <img id="logo" src="./images/logo.png"> </div> <center> <img src="./images/team_countly.jpg" id="wallpaper" /> <form method='post' name='comments'> <p><input type="text" name="message" value="Message Name"></p> <p><textarea>Message</textarea></p> <p><select> <option value='option1'>Option1</option> <option value='option2'>Option2</option> <option value='option3'>Option3</option> </select></p> <p><input id="submit-form" type="submit" value="Submit"></p> </form> <p><button id="unhandled_error" onclick="unhandled_error()">Unhandled Error</button></p> <p><button id="handled_error" onclick="handled_error()">Handled Error</button></p> <p><a id="track_link" href='#link'>Dummy link</a></p> <p><a href='https://countly.com/'>Countly</a></p> </center> </body> </html>

Details

Codacy Badge npm version js delivr

Countly Web SDK

This SDK is bundled from the modular Countly JavaScript SDK.

This repository contains the Countly Web SDK, which can be integrated into websites and web applications. The Countly Web SDK is intended to be used with Countly Lite, Countly Flex Countly Enterprise.

What is Countly?

Countly is a product analytics solution and innovation enabler that helps teams track product performance and customer journey and behavior across mobile, web, and desktop applications. Ensuring privacy by design, Countly allows you to innovate and enhance your products to provide personalized and customized customer experiences, and meet key business and revenue goals.

Track, measure, and take action - all without leaving Countly.

Integrating Countly SDK in your projects

For a detailed description on how to use this SDK check out our documentation.

For information about how to add the SDK to your project, please check this section of the documentation.

You can reach minimal integration info for your website from this section of the documentation.

Countly Web SDK has JSDoc3 compatible comments, and you can generate documentation by running npm run-script docs or you can use the online version.

For an example integration of this SDK, you can have a look here.

This SDK supports the following features: * Analytics * User Profiles * Crash Reports * A/B Testing * Performance Monitoring * Feedback Widgets

Security

Security is very important to us. If you discover any issue regarding security, please disclose the information responsibly by sending an email to security@count.ly and not by creating a GitHub issue.

Badges

If you like Countly, why not use one of our badges and give a link back to us so others know about this wonderful platform?

<a href="https://countly.com/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://countly.com/badges/dark.svg?v2" alt="Countly - Product Analytics" /></a>

<a href="https://countly.com/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://countly.com/badges/dark.svg" alt="Countly - Product Analytics" /></a>

<a href="https://countly.com/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://countly.com/badges/light.svg?v2" alt="Countly - Product Analytics" /></a>

<a href="https://countly.com/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://countly.com/badges/light.svg" alt="Countly - Product Analytics" /></a>

How can I help you with your efforts?

Glad you asked! For community support, feature requests, and engaging with the Countly Community, please join us at our Discord Server. We're excited to have you there!

Also, we are on Twitter and LinkedIn if you would like to keep up with Countly related updates.


  Files folder image Files (115)  
File Role Description
Files folder image.github (1 file, 1 directory)
Files folder imagecypress (1 file, 4 directories)
Files folder imageexamples (18 files, 6 directories)
Files folder imagelib (3 files)
Files folder imageplugin (2 directories)
Accessible without login Plain text file .eslintignore Data Auxiliary data
Plain text file .eslintrc.js Class Class source
Accessible without login Plain text file .markdownlint.json Data Auxiliary data
Accessible without login Plain text file .markdownlintignore Data Auxiliary data
Accessible without login Plain text file .stylelintrc.json Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Example Example script
Plain text file cypress.config.js Class Class source
Accessible without login Plain text file generateDocs.sh Data Auxiliary data
Accessible without login Plain text file jsdoc_conf.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file package.json Data npm support
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file SECURITY.md Data Auxiliary data

  Files folder image Files (115)  /  .github  
File Role Description
Files folder imageworkflows (4 files)
  Accessible without login Plain text file dependabot.yml Data Auxiliary data

  Files folder image Files (115)  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file codeql-analysis.yml Data Auxiliary data
  Accessible without login Plain text file documentation.yml Data Auxiliary data
  Accessible without login Plain text file node.js.yml Data Auxiliary data
  Accessible without login Plain text file release_notice.yml Data Auxiliary data

  Files folder image Files (115)  /  cypress  
File Role Description
Files folder imagee2e (27 files)
Files folder imagefixtures (12 files)
Files folder imageplugins (1 file)
Files folder imagesupport (5 files)
  Plain text file .eslintrc.js Class Class source

  Files folder image Files (115)  /  cypress  /  e2e  
File Role Description
  Accessible without login Plain text file async_queue.cy.js Example Example script
  Accessible without login Plain text file bridged_utils.cy.js Aux. Configuration script
  Accessible without login Plain text file consents.cy.js Aux. Configuration script
  Accessible without login Plain text file crashes.cy.js Aux. Configuration script
  Accessible without login Plain text file device_id.cy.js Aux. Configuration script
  Accessible without login Plain text file device_id_change.cy.js Example Example script
  Accessible without login Plain text file device_id_init_scenarios.cy.js Aux. Configuration script
  Accessible without login Plain text file events.cy.js Aux. Configuration script
  Accessible without login Plain text file health_check.cy.js Example Example script
  Accessible without login Plain text file heatmaps.cy.js Example Example script
  Accessible without login Plain text file integration.cy.js Aux. Configuration script
  Accessible without login Plain text file internal_limits.cy.js Aux. Configuration script
  Accessible without login Plain text file manual_widget_reporting.cy.js Example Example script
  Accessible without login Plain text file multi_instance.cy.js Aux. Configuration script
  Accessible without login Plain text file remaining_requests.cy.js Aux. Configuration script
  Accessible without login Plain text file reponse_validation.cy.js Aux. Configuration script
  Accessible without login Plain text file salt.cy.js Aux. Configuration script
  Accessible without login Plain text file sessions.cy.js Aux. Configuration script
  Accessible without login Plain text file storage.cy.js Aux. Configuration script
  Accessible without login Plain text file storage_change.cy.js Aux. Configuration script
  Accessible without login Plain text file user_agent.cy.js Aux. Configuration script
  Accessible without login Plain text file user_details.cy.js Aux. Configuration script
  Accessible without login Plain text file utm.cy.js Aux. Configuration script
  Accessible without login Plain text file views.cy.js Aux. Configuration script
  Accessible without login Plain text file view_utm_referrer.cy.js Aux. Configuration script
  Accessible without login Plain text file web_worker_queues.cy.js Example Example script
  Accessible without login Plain text file web_worker_requests.cy.js Example Example script

  Files folder image Files (115)  /  cypress  /  fixtures  
File Role Description
  Accessible without login HTML file base.html Doc. Documentation
  Accessible without login HTML file click_test.html Doc. Documentation
  Accessible without login HTML file multi_instance.html Doc. Documentation
  Accessible without login HTML file referrer.html Doc. Documentation
  Accessible without login HTML file scroll_test.html Doc. Documentation
  Accessible without login HTML file scroll_test_2.html Doc. Documentation
  Accessible without login HTML file scroll_test_3.html Doc. Documentation
  Accessible without login HTML file session_test_auto.html Doc. Documentation
  Accessible without login HTML file session_test_manual_1.html Doc. Documentation
  Accessible without login HTML file session_test_manual_2.html Doc. Documentation
  Accessible without login HTML file user_agent.html Doc. Documentation
  Accessible without login Plain text file variables.json Data Auxiliary data

  Files folder image Files (115)  /  cypress  /  plugins  
File Role Description
  Plain text file index.js Class Class source

  Files folder image Files (115)  /  cypress  /  support  
File Role Description
  Accessible without login Plain text file commands.js Aux. Auxiliary script
  Accessible without login Plain text file e2e.js Aux. Configuration script
  Plain text file helper.js Class Class source
  Accessible without login Plain text file index.js Aux. Auxiliary script
  Accessible without login Plain text file integration_helper.js Example Example script

  Files folder image Files (115)  /  examples  
File Role Description
Files folder imageAngular (1 file)
Files folder imageimages (2 files)
Files folder imagempa (4 files)
Files folder imagereact (1 directory)
Files folder imagestyle (1 file)
Files folder imageSymbolication (2 directories)
  Accessible without login Plain text file create_examples.py Example Example script
  Accessible without login HTML file examples_feedback_widgets.html Doc. Documentation
  Accessible without login HTML file example_apm.html Doc. Documentation
  Accessible without login HTML file example_apm_async.html Doc. Documentation
  Accessible without login Plain text file example_async.html Doc. Documentation
  Accessible without login HTML file example_fb.html Data Auxiliary data
  Accessible without login HTML file example_formdata.html Data Auxiliary data
  Accessible without login HTML file example_ga_adapter.html Doc. Documentation
  Accessible without login HTML file example_gdpr.html Doc. Documentation
  Accessible without login Plain text file example_helpers.html Doc. Documentation
  Accessible without login HTML file example_multiple_instances.html Doc. Documentation
  Accessible without login HTML file example_opt_out.html Doc. Documentation
  Accessible without login HTML file example_rating_widgets.html Doc. Documentation
  Accessible without login HTML file example_remote_config.html Doc. Documentation
  Accessible without login Plain text file example_sync.html Doc. Documentation
  Accessible without login HTML file example_web_worker.html Doc. Documentation
  Accessible without login Plain text file README.md Doc. Documentation
  Accessible without login Plain text file worker.js Aux. Auxiliary script

  Files folder image Files (115)  /  examples  /  Angular  
File Role Description
  Accessible without login Plain text file main.ts Data Auxiliary data

  Files folder image Files (115)  /  examples  /  images  
File Role Description
  Accessible without login Image file logo.png Data Auxiliary data
  Accessible without login Image file team_countly.jpg Data Auxiliary data

  Files folder image Files (115)  /  examples  /  mpa  
File Role Description
  Accessible without login Plain text file dummy_users.js Aux. Auxiliary script
  Accessible without login Plain text file helper_functions.js Aux. Auxiliary script
  Accessible without login HTML file index.html Doc. Documentation
  Accessible without login Plain text file worker_for_test.js Aux. Auxiliary script

  Files folder image Files (115)  /  examples  /  react  
File Role Description
Files folder imagesrc (10 files, 1 directory)

  Files folder image Files (115)  /  examples  /  react  /  src  
File Role Description
Files folder imageComponents (6 files)
  Accessible without login Plain text file App-WithEffect.js Aux. Auxiliary script
  Plain text file App-WithRouter.js Class Class source
  Accessible without login Plain text file App.test.js Aux. Auxiliary script
  Plain text file ErrorBoundary.js Class Class source
  Accessible without login Plain text file index.css Data Auxiliary data
  Accessible without login Plain text file index.js Aux. Auxiliary script
  Accessible without login Plain text file Location-WithEffect.js Aux. Auxiliary script
  Plain text file Location-WithRouter.js Class Class source
  Accessible without login Plain text file serviceWorker.js Example Example script
  Accessible without login Plain text file setupTests.js Aux. Auxiliary script

  Files folder image Files (115)  /  examples  /  react  /  src  /  Components  
File Role Description
  Accessible without login Plain text file Contact.js Aux. Auxiliary script
  Accessible without login Image file countly.jpg Data Auxiliary data
  Accessible without login Plain text file Header.js Aux. Auxiliary script
  Accessible without login Plain text file Home.js Aux. Auxiliary script
  Accessible without login Plain text file styles.css Data Auxiliary data
  Accessible without login Plain text file Users.js Aux. Auxiliary script

  Files folder image Files (115)  /  examples  /  style  
File Role Description
  Accessible without login Plain text file style.css Data Auxiliary data

  Files folder image Files (115)  /  examples  /  Symbolication  
File Role Description
Files folder imagepublic (1 file)
Files folder imagesrc (1 file)

  Files folder image Files (115)  /  examples  /  Symbolication  /  public  
File Role Description
  Accessible without login HTML file index.html Doc. Documentation

  Files folder image Files (115)  /  examples  /  Symbolication  /  src  
File Role Description
  Accessible without login Plain text file main.js Aux. Auxiliary script

  Files folder image Files (115)  /  lib  
File Role Description
  Accessible without login Plain text file countly.d.ts Example Example script
  Plain text file countly.js Class Class source
  Plain text file countly.min.js Class Class source

  Files folder image Files (115)  /  plugin  
File Role Description
Files folder imageboomerang (2 files)
Files folder imagega_adapter (2 files)

  Files folder image Files (115)  /  plugin  /  boomerang  
File Role Description
  Plain text file boomerang.min.js Class Class source
  Accessible without login Plain text file countly_boomerang.js Example Example script

  Files folder image Files (115)  /  plugin  /  ga_adapter  
File Role Description
  Accessible without login Plain text file doc.md Example Example script
  Accessible without login Plain text file ga_adapter.js Aux. Auxiliary script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:85
This week:0
All time:446
This week:3Up