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
| function onOpen() { | |
| var ui = SpreadsheetApp.getUi(); | |
| ui.createMenu('Product Functions') | |
| .addItem('Scrape Product SKUs', 'menuItem1') | |
| .addSeparator() | |
| .addSubMenu(ui.createMenu('Clean Up') | |
| .addItem('Second item', 'menuItem2')) | |
| .addToUi(); | |
| } |
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
| document.querySelectorAll('.content-table-row').forEach(item => { | |
| let linktext = item.querySelector('a').innerText | |
| let linkedit = item.querySelector('a').href | |
| let linkurl = item.querySelector('.private-microcopy.is--text--help').innerText | |
| let status = item.querySelector('[data-test-id="content-status-cell"]').innerText | |
| console.log(`${linktext},https://${linkurl},${linkedit},${status}`) | |
| }) |
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
| var _hsp = window._hsp = window._hsp || [] | |
| window.dataLayer = window.dataLayer || [] | |
| _hsp.push(['addPrivacyConsentListener', function(consent) { | |
| // console.log('-------- [HubSpot website logging start] --------') | |
| // console.log('analytics: ' + consent.categories.analytics) | |
| // console.log('advertisement: ' + consent.categories.advertisement) | |
| // console.log('functionality: ' + consent.categories.functionality) | |
| // console.log('-------- [HubSpot website logging start] --------') | |
| if(consent.categories.analytics) { |
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
| {% set tags_from_blog_post = ['Inspiration','Teambuilding'] %} | |
| {# this set ebooks would actually be from your HUBDB call #} | |
| {% set ebooks = [ | |
| { | |
| "name": "fred", | |
| "tags": "smile, Brains", | |
| }, | |
| { | |
| "name": "correct", | |
| "tags": "Inspiration, Brains", |
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
| const hubspot = require('@hubspot/api-client'); | |
| exports.main = async (event, callback) => { | |
| // not sure what you are doing here but putting this in a function seems better to me then the pasta | |
| const handleQuote = (quoteObject) => { | |
| // insert my cool code here that does stuff | |
| } | |
| // you should convert this to private app see: https://deckerdevs.com/blogs/hubspot-api-integrations-faqs-sunsetting-api-keys-for-private-apps |
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
| const SET_PLAYER_STATUS = 'SET_PLAYER_STATUS'; | |
| const hsVideos = window.hsVideoApi?.getPlayers(); | |
| const videoEls = document.querySelectorAll('.video-container'); | |
| function manageVideoStatus() { | |
| videoEls.forEach((videoEl) => { | |
| const iframe = videoEl.querySelector('iframe'); | |
| if (iframe) { | |
| const videoId = iframe.getAttribute('id')?.replace('hs_player_', ''); |
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
| const hubspot = require('@hubspot/api-client') | |
| const hubspotClient = new hubspot.Client({ | |
| "accessToken": process.env.PRIVATE_APP_TOKEN | |
| }) | |
| const labels = { | |
| "singular": "Property", | |
| "plural": "Properites" | |
| }; |
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
| var _hsp = window._hsp = window._hsp || [] | |
| window.dataLayer = window.dataLayer || [] | |
| _hsp.push(['addPrivacyConsentListener', function(consent) { | |
| // console.log('-------- [HubSpot website logging start] --------') | |
| // console.log('analytics: ' + consent.categories.analytics) | |
| // console.log('advertisement: ' + consent.categories.advertisement) | |
| // console.log('functionality: ' + consent.categories.functionality) | |
| // console.log('-------- [HubSpot website logging start] --------') | |
| if(consent.categories.analytics) { |
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
| <div class="form-module__form ll"></div> | |
| <script id="form-module__script" charset="utf-8" type="text/javascript" data-src="//js.hsforms.net/forms/v2.js" data-targetclass="form-module__form" data-portal="{{ portalId }}" data-form="{{ module.module_content.form_field.form_id }}" defer></script> | |
| <script> | |
| function getFormData(formScript) { | |
| return { | |
| id: formScript.dataset.form, | |
| portal: formScript.dataset.portal, | |
| targetClass: "." + formScript.dataset.targetclass |
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
| window.addEventListener('message', function (event) { | |
| if (event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormReady') { | |
| // hubspot form is Loaded | |
| } | |
| }) |