Welcome to the PartnerStack Integration Docs

Here you can find guides, documentation, support and FAQs to get you setup on PartnerStack.

Chat with us by clicking the message bubble in the bottom right if you are having any trouble!

Get Started



PartnerstackJS is javascript snippet that reads browser cookies and sends signup information back to your PartnerStack account.
This process should take about 30 minutes but may vary depending on your application, tech stack, and skill level.

In this Guide:

Step 1. Identify Landing Pages & Capture Points

It is critical to identify all of the paths a visitor may take to becoming your customer. You'll want to connect PartnerStackJS to as many of these paths as possible.

Missing critical signup flows will result in missed tracking and unhappy partners.
For example, connecting PartnerStackJS to your signup page but not your demo request form would stop you from crediting partners for referral demos that convert into paying accounts.

Here are some common capture points:

  • Registration / Signup Form
  • OAuth Signup
  • "Request Demo" Form
  • "Contact Sales" Form

Step 2. Install PartnerStackJS

With your capture points identified, you'll install PartnerStackJS on those pages.

Copy PartnerStackJS from Integration Settings

Go to your integrations settings page in PartnerStack, and copy your Production PartnerStackJS snippet.

Paste into Header of your page

Paste your entire PartnerStackJS snippet between the <Head> tags of every capture point page.

When you've properly installed PartnerStackJS, the partnerstack javascript object will be defined.
You can check for proper installation by opening your Browsers Developer Tools > Console and typing partnerstack.

Step 3. Connect form data to PartnerStack Object

Each time a new user signs up for your website you'll assign their name, email, and customer_key to the PartnerStack object, and call then growsumo.createSignup().

Here are the specific assignments:

  • growsumo.data.name={User_Name}
  • growsumo.data.email={User_Email}
  • growsumo.data.customer_key={unique_key_for_each_customer}

A note on Customer_Key

The customer_key is a unique string that identifies each customer you send to PartnerStack.
It must be non-changing, and of type String.

Ideally you can use an id or key that is already stored in your database to uniquely identify users.
your_users_id = "user_1z2y3wx5a6b7c";
growsumo.data.customer_key = your_users_id;

If you don't have a UserID to assign at the time of registration, it might make the most sense to use the User's Email as their customer_key.

your_users_email = "[email protected]";
growsumo.data.customer_key = your_users_email;

Please ensure that your customer_key has been passed through to growsumo.data.customer_key before you call growsumo.createSignup()

Example Code

This is an example, you cannot just copy & paste this into your website.

<!— Example signup form —>
<input id=‘name’ type=‘text’>
<input id=‘email’ type=‘text’>
<input id=“submit” type=“button” onclick=“signup()”>

<!— Example jQuery function that collects field values, 
assigning them to GrowSumo.data and calling createSignup() to create a customer on GrowSumo —>
function signup(){

Once you've properly assigned the form data to growsumo.data. you can check for proper installation by opening your Browsers Developer Tools > Console and typing growsumo.

See the example console below,

NOTE* Some values within growsumo.data will be cleared from the object after createSignup() is called.

If you redirect to a new page on signup

If you redirect to a new page on signup you will want to use the createSignup callback function to make sure the request is completed before redirection

You can see a fully working solution here https://jsfiddle.net/xobc3cw5/

function handleSubmit(event) {
    // this prevents the form from submitting
    // until we are done calling out to growsumo and are ready to submit it
          console.log('create signup was called successfully')
        // this is the callback function
        // it will be fired when the signup has been sent to growsumo
        // you will want to call submit in here

<form id="signup-form" 
    onsubmit="return handleSubmit(event);" 
    method="POST" action="https://example.com/signup">
        <input id="signup-name" type="text" value="">
        <input id="signup-email" type="text" value="">
        <input id="signup-id" type="text" value="" style="display:none">
        <button type="submit">Sign up</button>

Call a function immediately after PartnerStackJS has loaded

If you would like to call a function after the PartnerStackJS snippet has finished loading simply name the function growsumoInit()

    function growsumoInit() {
        alert('GrowSumoJS snippet loaded');

Step 4. Testing

Go to your Integrations Testing Suite.
Follow the on page guide for the Customer created test.
After you sign up, the Request Log will show any traffic being sent to your program.
Click "Test" when a successful signup event occurs.

Why isn't my test passing?

Tests will only pass once a properly formatted signup request is received.
Before contacting support, please ensure that:

  • You are opening the referral link in an incognito window.
  • You are assigning data to growsumo.data.<variable>
  • You are casting variables to Strings if needed
  • You are calling growsumo.createSignup()

Still having issues? Send us a note via intercom

Updated 4 months ago


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.