Last active
October 13, 2020 10:13
-
-
Save sbounmy/e47b7e2ac3287ee6a4f0a73dcfa26528 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wixLocation from 'wix-location'; | |
import wixWindow from 'wix-window'; | |
import { getCustomer } from 'backend/stripe'; | |
$w.onReady(async function () { | |
(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){ | |
(t[a].q=t[a].q||[]).push(arguments)}})(wixWindow,'tap'); | |
var sessionId = wixLocation.query.session_id; | |
var customer = await getCustomer(sessionId); | |
// is defined but does not trigger on test integration tester... | |
wixWindow.tap('create', 'my-id', { integration: "stripe" }); | |
wixWindow.tap('trial', customer); | |
// wixWindow.tap('trial', 'test1234'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The other code is included in
<head>
as follow