@frontend-sdk/privy
v0.25.1
Published
Privy’s marketing platform helps merchants grow their email list and increase average order size with popups, flyouts, coupons and more.
Downloads
17
Keywords
Readme
Privy
Privy’s marketing platform helps merchants grow their email list and increase average order size with popups, flyouts, coupons and more.
Overview
Users of Shogun Frontend can leverage frontend-sdk/privy
package to display popups and Free Shipping components for Shopify and BigCommerce stores.
Installation
yarn add @frontend-sdk/privy
npm install @frontend-sdk/privy
Usage
Get your Privy Public App Identifier here.
Create a new section, in the examples below we will name the new section
Privy
Inject the widget into the DOM with
usePrivy(appIdentifier)
oruseAsyncPrivy(appIdentifier)
.Click on the
new Campaign
here to add a Privy Play to your storeChoose from the pre-built Privy plays (Welcome Discount, Mobile Signup Discount, Cart Saver, Free Shipping Bar, Exit Email Capture), or build your own.
Select the coupon you would like to offer and click
Continue
Edit, add, and style elements using the Privy Dashboard
Publish the campaign to view the component in the store
Synchronous Widget Example
import { usePrivy } from '@frontend-sdk/Privy'
export const Privy = ({ appIdentifier }) => {
usePrivy(appIdentifier)
return <div>…</div>
}
Asynchronous Widget Example
import { useAsyncPrivy } from '@frontend-sdk/Privy'
const Privy = ({ appIdentifier }) => {
useAsyncPrivy(appIdentifier)
return <div>…</div>
}