LogoLogo
HomeDashboardProduct Docs
  • Introduction
  • Core Concepts
    • Events
    • Sessions
    • User/Customer Profile
  • PLATFORM INTEGRATIONS
    • Shopify Integration
  • Sdk Integrations
    • Browser SDK
      • Integrate SDK
      • Track Events
      • Track Users
      • Configure Web Push
      • Reading Session Identifer
      • Syncing Cart Items
    • Android SDK (Coming Soon)
      • Install Android Sdk
      • Identify Customers
      • Push Notification Integration
    • iOS SDK
      • Install iOS Sdk
      • Tracking User
      • Tracking Events
      • Push Notification Settings
        • Configure APNS In Growlytics
        • Configure Mobile App For Push
        • Handling Push Click
    • Other
      • Upload Customers using CSV
  • Channel Integrations
    • Email
      • Amazon SES
      • SendGrid
      • Custom SMTP
    • Mobile Push Notifications
      • Configure FCM Channel
    • Web Push Notifications
    • Ad Networks
      • Facebook Audiences
      • Google Ad Audiences
  • REST APIs
    • Overview
    • Tracking Users (Shopify Only)
    • Tracking Users (Non-shopify)
    • Tracking Events (Shopify Only)
    • Tracking Events (Non-shopify)
    • Syncing Products
    • Mobile App Apis
  • Webhooks
    • Coupon Webhook
    • Connector Webhooks
Powered by GitBook
On this page
  • Step 1: Install SDK
  • Step 3: Further Integrations

Was this helpful?

  1. Sdk Integrations
  2. Browser SDK

Integrate SDK

This page will give detailed description of how you can integrate Growlytics javascript SDK to your website.

Step 1: Install SDK

Copy-paste the following code into <head> of your application's root page. Make sure this script is added on all the pages of your website or web app.

<script>
    let growlyticsSettings = {
        apiKey: '<api_key>',
        enabled: true
    };
    var g = { input: growlyticsSettings, q: [] };var t=["events.track","user.identify","user.push","showMessage","requestNotificationPermission","cart.sync"];for(let e=0;e<t.length;e++){let s=t[e].split("."),i=function(){g.q.push({a:t[e],p:arguments})};if(s.length>0){let t=s[0],e=s[1];g[t]=g[t]?g[t]:{},g[t][e]=i}else g[s[0]]=i}
    window['Growlytics'] = g;
    (function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"==document.location.protocol?"https://static.growlytics.in":"http://static.growlytics.in")+"/growlytics.sdk.min.js";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(t,c)})();
</script>

growlyicsSettings method supports following parameters.

Option

Type

Description

apiKey

string

Api Key for given project. You can find the api key in project settings page.

enabled

boolean

Enable/disable growlytics sdk.

Step 3: Further Integrations

For further integrations, please refer to individual sections.

PreviousBrowser SDKNextTrack Events

Last updated 1 year ago

Was this helpful?

Track Events
Track Users
Web Push Notifications