This file contains 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
require("dotenv").config() | |
const axios = require("axios"); | |
const API_KEY = process.env.API_KEY; | |
const count = 100; | |
const mainUrl = `https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=${API_KEY}&count=${count}&property=email`; | |
const createCsvWriter = require("csv-writer").createArrayCsvWriter; | |
const csvWriter = createCsvWriter({ | |
path: "recursion.csv", | |
header: ["EMAIL", "VID"] | |
}); |
This file contains 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
const flatten = require("flat"); | |
const dogs = { | |
dog1: { | |
name: "Bailey", | |
breed: "Lab", | |
age: 3, | |
best_friend: { | |
name: "Vinny", | |
breed: "Golden Retriever", |
This file contains 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
const express = require("express"); | |
const bodyParser = require("body-parser"); | |
const app = express(); | |
app.use(express.static(__dirname + "/public")); | |
app.use(bodyParser.urlencoded({ extended: true })); | |
app.set("view engine", "ejs"); | |
const headers = { |
This file contains 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
const axios = require("axios"); | |
const Base64 = require('js-base64').Base64; | |
const endpoint = "https://a.klaviyo.com/api/track?data" | |
const object = JSON.stringify({ | |
token: [[ REDACTED ]], | |
event: "Louisiana Purchase", | |
customer_properties: { | |
$email: "thomas.jefferson@gmail.com" | |
}, |
This file contains 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
var _learnq = _learnq || []; | |
var continueButton = document.querySelector("#ProfileContinue"); | |
var finishButton = document.querySelector("#SurveyDone"); | |
var local = JSON.parse(localStorage.getItem("surveyStatus")); | |
function sendIdentify() { | |
var local = JSON.parse(localStorage.getItem("surveyStatus")); | |
var emailAddress = document.querySelector("#SurveyProfileContent input[type='email']").value; |
This file contains 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
<script> | |
var finishedQuizButton = document.querySelector("#finishedQuizButton") | |
// this is a fake button, but is an example of what you'd do to select a button with the ID of "finishedQuizButton" | |
var payload = { | |
"user": { | |
"$email": "john.smith@gmail.com", | |
"$firstname": "John", | |
"$lastname": "Smith" | |
}, | |
"dogs": [{ |
This file contains 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
<script> | |
var user = { | |
firstname: "", | |
lastname: "", | |
emailid: "" | |
} | |
var checkExist = setInterval(function() { | |
if ($("form[name='loginradius-registration']").length) { | |
var form = $("form[name='loginradius-registration']")[0]; |
This file contains 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
<script type="text/javascript"> | |
var form = $(".c-email-signup__form.js-subscribe")[0]; | |
var user = { | |
email: "" | |
}; | |
/* CHANGE LIST ID HERE */ | |
var listID = "somelistID" | |
/* CHANGE LIST ID HERE */ |
This file contains 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
<script> | |
document.addEventListener("DOMContentLoaded", function() { | |
$("button[type='submit']").click(function(e) { | |
if ($("#subscribeToNewsletter").is(':checked')) { | |
e.preventDefault(); | |
// grab fields | |
var email = $('input#shippingEmail').val(); | |
var firstname = $('input#shippingFirstName').val(); | |
var company = $('#shippingCompanyName').val() || ""; |
This file contains 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
<script> | |
document.addEventListener("DOMContentLoaded", function() { | |
$("button[type='submit']").click(function(e) { | |
// grab customer fields | |
var email = $('input#shippingEmail').val(); | |
var firstname = $('input#shippingFirstName').val(); | |
var company = $('#shippingCompanyName').val() || ""; | |
var lastname = $('input#shippingLastName').val(); | |
var address = $('input#shippingAddressOne').val(); | |
var address2 = $('input#shippingAddressTwo').val(); |
OlderNewer