Custom-built Site Integration
Zoho Thrive provides a way for businesses with custom-built sites (built from scratch without the help of any builder software) to integrate with Zoho Thrive and run affiliate and loyalty programs.
Before proceeding with the integration, you'll need to create a brand for your site.
Create a brand
In the Selection page, select Custom-built.
Click Connect.
In the pop-up, do the following:
Enter your Brand Name.
Enter your Brand URL (the URL of your website where you wish to run the programs).
Provide a Support Email Address we can use to contact you.
Select the Currency you use for payment transactions.
Click Create.
After a brand is created, follow the steps below to establish a connection between your custom-built site and Zoho Thrive.
Integrate your site
Navigate to the More -> Installation page inside Zoho Thrive.
Copy Secret Key, Brand Code, and save it securely.
Copy the below script and paste it between the <head> and </head> tags on each page of your site.
<script type="text/javascript">
var platformType='custom_user_site';
var thriveWidgetCode= '{{Brand code}}';
var ztUserData = {};
</script>
<script id="thrive_script" src="{{Public Domain URL}}/thrive/publicpages/thrivewidget"></script>
Replace the placeholders above with their corresponding variables
{{Brand code}} - This variable is the same as the one you copied from More -> Installation Page
{{Public Domain URL}} - Copy the Public Domain URL for your data center from the table below. You can find out which data center you’re accessing Zoho Thrive from by visiting the Zoho Thrive web app and checking its URL.
Data Center | Domain URL | Public Domain URL |
United States | ||
India | ||
Europe | ||
South Africa | ||
Australia | ||
Canada |
Copy the below script and paste it between the <body> and </body> tags on each page of your site.
<script type="text/javascript">
var ztUserData = {};
ztUserData['za_email_id'] = {{Email Address of Customer}};
ztUserData['user_unique_id'] = {{Unique Identifiable System ID of Customer}};
ztUserData['thrive_digest'] = {{Server Generated HMAC}};
ztUserData['signUpPage'] = {{Signup URL};
ztUserData['signInPage'] = {{Login URL}};
ztWidgetDelay = {{Time in secs}};
</script>
Replace the placeholders above with their corresponding variables defined in your system.
{{Email Address of Customer}} - This variable must hold the email addresses of your customers.
{{Unique Identifiable System ID of Customer}} - This variable must hold the unique identifiers of the customers in your system. We use it to distinguish customers and their data.
{{Server Generated HMAC}} - We use HMAC (Hash-based Message Authentication Code) as a means to avoid tampering with the above customer data when sent from your end. You must generate an HMAC and replace it here.
Steps to generate a HMAC:
From the scripts below, select one based on your programming language preference. Copy the script and compute it on your server.
NodeJS
const crypto = require("crypto")
let email_id="peter.prescott@zylker.com" // Email address of Customer
let customer_id = "bfuyw3fiub3289uij" //Unique Identifiable System ID of Customer
let digestRaw = email_id+customer_id
let algorithm = "sha256"
let secret = "e46788a75fe6a876ba83a3892cfd201f"; // Secret Key
let HMACDigest = crypto.createHMAC(algorithm,secret).update(digestRaw).digest("hex")
Ruby
require 'base64'
require 'openssl'
email_id="peter.prescott@zylker.com" // Email address of Customer
customer_id="bfuyw3fiub3289uij" //Unique Identifiable System ID of Customer
digestRaw= email_id+customer_id;
algorithm = OpenSSL::Digest.new('sha256')
secret = 'e46788a75fe6a876ba83a3892cfd201f' //Secret Key
HMACDigest = OpenSSL::HMAC.hexdigest(algorithm, secret, digestRaw)
PHP
$email_id = "peter.prescott@zylker.com"; //Email address of Customer
$customer_id="bfuyw3fiub3289uij"; //Unique Identifiable System ID of Customer
$digestRaw= $email_id.$customer_id;
$algorithm = 'sha256';
$secret = 'e46788a75fe6a876ba83a3892cfd201f'; //Secret Key
$HMACDigest = hash_HMAC($algorithm, $digestRaw, $secret);
In the above scripts instead of "peter.prescott@zylker.com" and "bfuyw3fiub3289uij" substitute their respective variables. The variable for email_id must contain the email addresses of your customers, while the customer_id's must hold the customer's unique identifiable system ID.
Replace the placeholder for secret, "e46788a75fe6a876ba83a3892cfd201f" with the Secret Key found on your Scripts page.
Return the HMACDigest in a way that the HMAC code generated replaces the {{Server Generated HMAC}} inside the tracking script.
{{Signup URL}} - The URL of your site’s sign up page.
{{Login URL}} - The URL of your site’s sign-in/log-in page.
{{Time in secs}} - This will delay the widget from loading before the set time. It's helpful for sites where the data takes time to process. You can set the delay for up to a maximum of 40 secs.
Note: It is not necessary to modify the {{Signup URL}} and {{Login URL}} if you do not plan to run a loyalty program.
Your site will now be successfully integrated with Zoho Thrive.
Now, while building the programs, there are two other instances that require a manual data push from your end.
If you plan on using any of the following tasks, Make a Purchase, Referral Purchase (Loyalty Program), or Upon Referral Purchase (Affiliate Program), for your programs - Create an HTTP request to push the purchase details to Zoho Thrive.
If you create a custom task for your loyalty program - Create an HTTP request to push the task details to Zoho Thrive after its completion.
If you face any difficulties or require assistance with any of the steps above, feel free to write to us at support@zohothrive.com.
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.