CustomerGlu Developer Documentation
  • 🔧Getting started
  • 🔧Quickstart Guide for React Web Apps
  • 📱Quickstart Guide for React Native Apps
  • 📱Quickstart Guide for Flutter Apps
  • Integrating with SDKs
    • Web SDK
    • Mobile SDKs
      • How to Test Integration?
    • Cordova SDK
    • Shopify
  • Integrating with APIs
    • Register User/Device
    • Load Campaigns
    • Binding Webview to Native App Functions
    • 🔍Using __GLU_NUDGE_CLICK for Widget Visibility
    • 🎯API-based Segmentation Quickstart Guide
  • 🔌Third-Party Integrations
    • Source
      • Sending Events directly from Server
      • Segment
      • Moengage
      • Amplitude
      • Clevertap
      • Webengage
    • Destination
      • Analytics Webhook
      • Customer.io
      • Talon.One
      • Segment
      • MoEngage
      • Amplitude
      • Clevertap
      • WebEngage
      • Google Sheets
    • Cohort
      • Mixpanel
  • Miscellaneous Topics
    • Direct Campaign/Wallet URLs
    • Configuring Webhooks
      • Rewards Webhook
      • Nudge Webhook
    • Notifications
      • FCM
      • APNs
      • CustomerGlu Notification
      • Testing Nudges
    • Referral Campaigns
      • Firebase
      • Branch
    • Handling Non Logged-in Users
    • Testing Campaigns with User Logs
    • Using the Editor
      • How to edit Buttons in Campaigns
    • How to Create and Manage Segments in CustomerGlu
  • SCHEMA REPOSITORY
    • Webhook Schema
      • Reward Webhook Schema
      • Nudge Webhook Schema
      • Raw Event Webhook Schema
    • Webview Callback Schema
      • Analytics Event Schema
    • Analytics schema V4
      • Page Events
      • Track Events (UI)
      • Track Events (SDK)
      • State-Change Events
      • System Events
    • 🗝️FAQ
      • API Key
      • How to find and add Screen Names for Entrypoints
  • Demo Apps
    • Demo Apps
Powered by GitBook
On this page

Was this helpful?

  1. Integrating with SDKs

Shopify

Integrate the CustomerGlu SDK on your Shopify Store with a few clicks...

PreviousCordova SDKNextIntegrating with APIs

Last updated 1 year ago

Was this helpful?

  1. Log in to your Shopify Store Admin Panel

2. Select Online Store->Themes

3. Select Actions->Edit Code

4. In the theme.liquid file, paste the code snippet given below, just before the </body> tag

    {% comment %}__GLU__CODE__START{% endcomment %}
    {% if customer %}
      <script type="text/javascript">
        window.__GLU__userId = "{{ customer.id }}";
      </script>
    {% endif %}
    <script type="text/javascript">
      window.__GLU__writeKey = "<YOUR API KEY>";
    </script>
    <script type="text/javascript" src="https://assets.customerglu.com/scripts/sdk/v4.6/shopify.js"></script>
    {% comment %}__GLU__CODE__END{% endcomment %}

5. Save the file

6. Viola! You're all set!

Here's a video walkthrough of the process:

Replace the value of "window.__GLU__writeKey" with your API KEY

⚠️