### Example Delete Request Source: https://docs.videowise.com/product-api/endpoints An example of a DELETE request to the product API, demonstrating path and query parameters. ```Bash DELETE /product/008884303989?siteId=YourSiteID&siteType=Salesforce ``` -------------------------------- ### Videowise Widget Code Installation (HTML) Source: https://docs.videowise.com/installation This snippet provides the HTML code required to install the Videowise Widget on a website. It includes links to CSS and JavaScript files necessary for the widget's functionality. Ensure this script is added to the head of your site for proper integration. ```html ``` -------------------------------- ### Request Metrics Initialization Source: https://videowise.com/blog Initializes the Request Metrics agent by installing it with a provided token. It sets up event tracking, error reporting, and metadata collection. ```javascript var RM = window.RM || {}; (function(t, e, n, r) { function a() { return e && e.now ? e.now() : null; } if (!n.version) { n._events = []; n._errors = []; n._metadata = {}; n._urlGroup = null; window.RM = n; n.install = function(e) { n._options = e; var a = t.createElement("script"); a.async = true; a.crossOrigin = "anonymous"; a.src = r; var o = t.getElementsByTagName("script")[0]; o.parentNode.insertBefore(a, o); }; n.identify = function(t, e) { n._userId = t; n._identifyOptions = e; }; n.sendEvent = function(t, e) { n._events.push({ eventName: t, metadata: e, time: a() }); }; n.setUrlGroup = function(t) { n._urlGroup = t; }; n.track = function(t, e) { n._errors.push({ error: t, metadata: e, time: a() }); }; n.addMetadata = function(t) { n._metadata = Object.assign(n._metadata, t); }; } })(document, window.performance, window.RM || {}, "https://cdn.requestmetrics.com/agent/current/rm.js"); RM.install({ token: "s5hc8ek:c8mz9ef" }); ``` -------------------------------- ### Example Product JSON Source: https://docs.videowise.com/product-api/endpoints A sample JSON object representing a product, conforming to the retrieval API response schema. ```JSON { "id": "008884303989", "sku": "008884303989", "title": "Platinum Blue Stripes Easy Care Fitted Shirt", "featured_image": "https://example.com/image1.jpg", "url": "https://example.com/product1" } ``` -------------------------------- ### Request Metrics Agent Installation Source: https://videowise.com/faq Installs the Request Metrics (RM) JavaScript agent for performance monitoring and error tracking. It configures the agent with a unique token and loads the agent script from a CDN. ```javascript (function(t,e,n,r){function a(){return e&&e.now?e.now():null}if(!n.version){n._events=[];n._errors=[];n._metadata={};n._urlGroup=null;window.RM=n;n.install=function(e){n._options=e;var a=t.createElement("script");a.async=true;a.crossOrigin="anonymous";a.src=r;var o=t.getElementsByTagName("script")[0];o.parentNode.insertBefore(a,o)};n.identify=function(t,e){n._userId=t;n._identifyOptions=e};n.sendEvent=function(t,e){n._events.push({eventName:t,metadata:e,time:a()})};n.setUrlGroup=function(t){n._urlGroup=t};n.track=function(t,e){n._errors.push({error:t,metadata:e,time:a()})};n.addMetadata=function(t){n._metadata=Object.assign(n._metadata,t)}}})(document,window.performance,window.RM||{},"https://cdn.requestmetrics.com/agent/current/rm.js"); RM.install({ token: "s5hc8ek:c8mz9ef" }); ``` -------------------------------- ### Request Metrics Agent Installation Source: https://videowise.com/find-a-partner Installs the Request Metrics JavaScript agent to monitor application performance and errors. It requires a unique token for data collection. ```javascript (function(t,e,n,r){function a(){return e&&e.now?e.now():null}if(!n.version){n._events=[];n._errors=[];n._metadata={};n._urlGroup=null;window.RM=n;n.install=function(e){n._options=e;var a=t.createElement("script");a.async=true;a.crossOrigin="anonymous";a.src=r;var o=t.getElementsByTagName("script")[0];o.parentNode.insertBefore(a,o)};n.identify=function(t,e){n._userId=t;n._identifyOptions=e};n.sendEvent=function(t,e){n._events.push({eventName:t,metadata:e,time:a()})};n.setUrlGroup=function(t){n._urlGroup=t};n.track=function(t,e){n._errors.push({error:t,metadata:e,time:a()})};n.addMetadata=function(t){n._metadata=Object.assign(n._metadata,t)}}})(document,window.performance,window.RM||{},"https://cdn.requestmetrics.com/agent/current/rm.js"); RM.install({ token: "s5hc8ek:c8mz9ef" }); ``` -------------------------------- ### Quantcast Tracking Initialization Source: https://videowise.com/blog Initializes Quantcast tracking by creating and inserting a script element into the DOM and pushing an event with account and user ID. ```javascript var elem = document.createElement('script'); var scpt = document.getElementsByTagName('script')[0]; elem.async = true; elem.type = "text/javascript"; elem.src = '//edge.quantserve.com/quant.js'; scpt.parentNode.insertBefore(elem, scpt); window._qevents = window._qevents || []; window._qevents.push({ qacct: "p-CM-UVfe9NsyZk", uid: "__INSERT_EMAIL_HERE__" }); ``` -------------------------------- ### Quantserve Tag Initialization Source: https://videowise.com/blog JavaScript code snippet to load the Quantserve tracking script. It dynamically creates a script element and appends it to the document head, ensuring tracking is initiated. ```javascript window._qevents = window._qevents || []; (function () { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; ele ``` -------------------------------- ### HubSpot Variables and Initialization Source: https://videowise.com/blog Sets up global HubSpot variables including render ID, page ID, portal ID, and base URLs. This object is used by HubSpot's tracking scripts to manage page context and rendering. ```javascript var hsVars = { render_id: "34c34ce9-c9dc-4de9-a995-e24e3a762edc", ticks: 1753208576660, page_id: 66229135527, content_group_id: 47492711823, portal_id: 20080100, app_hs_base_url: "https://app.hubspot.com", cp_hs_base_url: "https://cp.hubspot.com", language: "en", analytics_page_type: "listing-page", scp_content_type: "", analytics_page_id: "66229135527", category_id: 7, folder_id: 0, is_hubspot_user: false } ``` -------------------------------- ### Quantcast Initialization and Event Tracking Source: https://videowise.com/find-a-partner Initializes the Quantcast tracking script and pushes an event with account and user ID. This snippet is responsible for loading the Quantcast measurement tag and sending user data. ```javascript (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); window._qevents.push({ qacct: "p-CM-UVfe9NsyZk", uid: "__INSERT_EMAIL_HERE__" }); ``` -------------------------------- ### Google Analytics and Consent Management Setup Source: https://videowise.com/blog JavaScript code for initializing Google Analytics using gtag.js. It configures default consent settings for Google Consent Mode V2 and includes logic to update consent based on user interaction or privacy settings. ```javascript var _hsp = window._hsp = window._hsp || []; window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } var useGoogleConsentModeV2 = true; var waitForUpdateMillis = 1000; if (!window._hsGoogleConsentRunOnce) { window._hsGoogleConsentRunOnce = true; gtag('consent', 'default', { 'ad_storage': 'denied', 'analytics_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'wait_for_update': waitForUpdateMillis }); if (useGoogleConsentModeV2) { _hsp.push(['useGoogleConsentModeV2']) } else { _hsp.push(['addPrivacyConsentListener', function(consent){ var hasAnalyticsConsent = consent && (consent.allowed || (consent.categories && consent.categories.analytics)); var hasAdsConsent = consent && (consent.allowed || (consent.categories && consent.categories.advertisement)); gtag('consent', 'update', { 'ad_storage': hasAdsConsent ? 'granted' : 'denied', 'analytics_storage': hasAnalyticsConsent ? 'granted' : 'denied', 'ad_user_data': hasAdsConsent ? 'granted' : 'denied', 'ad_personalization': hasAdsConsent ? 'granted' : 'denied' }); }]); } } gtag('js', new Date()); gtag('set', 'developer_id.dZTQ1Zm', true); gtag('config', 'G-W4THMJFHT1'); ``` -------------------------------- ### HubSpot Page Initialization Script Source: https://videowise.com/faq This script initializes HubSpot variables and tracking data for the current page, including content type, canonical URL, page ID, and other metadata. It also sets up global variables for HubSpot's tracking and rendering mechanisms. ```javascript var hsVars = hsVars || {}; hsVars['language'] = 'en'; var _hsq = _hsq || []; _hsq.push(["setContentType", "standard-page"]); _hsq.push(["setCanonicalUrl", "https:\/\/videowise.com\/faq"]); _hsq.push(["setPageId", "77232816395"]); _hsq.push(["setContentMetadata", { "contentPageId": 77232816395, "legacyPageId": "77232816395", "contentFolderId": null, "contentGroupId": null, "abTestId": null, "languageVariantId": 77232816395, "languageCode": "en" }]); var hsVars = { render_id: "0ff26fcb-f031-4b70-89e6-4976314a44a2", ticks: 1753174864765, page_id: 77232816395, content_group_id: 0, portal_id: 20080100, app_hs_base_url: "https://app.hubspot.com", cp_hs_base_url: "https://cp.hubspot.com", language: "en", analytics_page_type: "standard-page", scp_content_type: "", analytics_page_id: "77232816395", category_id: 1, folder_id: 0, is_hubspot_user: false } ``` -------------------------------- ### Render Inline Widgets on Non-Product Page Source: https://docs.videowise.com/init This snippet demonstrates rendering inline widgets on pages that are not product pages, such as blog posts or landing pages. It requires a specific HTML container and uses the `initVideowiseBulk` function with URL-based parameters. The `url` and `device` (optional) are key inputs. ```javascript initVideowiseBulk({ shop: 'your-store.myshopify.com'; widgetIds: ['widget-id']; url: 'https://your-store.myshopify.com/your/url'; device: 'DESKTOP' | 'MOBILE'; //optional }) ``` -------------------------------- ### Quantcast Pixel Image Source: https://videowise.com/blog A hidden image element used by Quantcast for tracking pixel data. ```html
Quantcast ``` -------------------------------- ### Social SDK Initialization Source: https://videowise.com/blog Loads the Facebook SDK and Twitter widgets script. These are used for social sharing and engagement features on the website. ```javascript (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v3.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); ``` ```javascript !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } }(document,"script","twitter-wjs"); ``` -------------------------------- ### Quantcast Tracking Initialization Source: https://videowise.com/faq Loads the Quantcast JavaScript tag for website analytics and audience measurement. It includes the account ID for tracking and ensures the script is asynchronously loaded. ```javascript window._qevents = window._qevents || []; (function () { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); window._qevents.push({ qacct: "p-CM-UVfe9NsyZk", uid: "__INSERT_EMAIL_HERE__" }); ``` -------------------------------- ### Intercom Initialization and Widget Loading Source: https://videowise.com/find-a-partner Configures and initializes the Intercom chat widget. It sets the API base and app ID, and dynamically loads the Intercom JavaScript SDK to enable chat functionality. ```javascript window.intercomSettings = { api_base: "https://api-iam.intercom.io", app_id: "y5ry8ttu" }; // We pre-filled your app ID in the widget URL: 'https://widget.intercom.io/widget/y5ry8ttu' (function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/y5ry8ttu';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})(); ``` -------------------------------- ### Intercom Chat Integration Source: https://videowise.com/blog Configures and loads the Intercom chat widget. It sets up the necessary settings and dynamically injects the Intercom script if not already present. ```javascript window.intercomSettings = { api_base: "https://api-iam.intercom.io", app_id: "y5ry8ttu" }; (function(){ var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', w.intercomSettings); } else { var d = document; var i = function() { i.c(arguments); }; i.q = []; i.c = function(args) { i.q.push(args); }; w.Intercom = i; var l = function() { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/y5ry8ttu'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); }; if (document.readyState === 'complete') { l(); } else if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })(); ``` -------------------------------- ### Product API Operations Overview Source: https://docs.videowise.com/product-api/overview This section outlines the core functionalities of the Product API, including bulk and single product imports, retrieval by reference ID or SKU, and deletion. ```APIDOC Base URL: https://api.videowise.com Operations: Bulk Import: Description: Import multiple products in a single request. Limitations: Maximum of 10000 products per request. Recommendations: Use bulk operations for efficiency. Single Import: Description: Import or modify a single product. Recommendations: Avoid multiple single import requests if bulk is possible. Retrieve Product: Description: Fetch product details by reference ID or SKU. Delete Product: Description: Delete a product by its reference ID or SKU. Key Features: - Bulk Operations: Efficiently import multiple products at once. - Flexible Product Data: Supports optional fields like `price`, `price_min`, `price_max`, and `images`. - Secure Authentication: Requires an access token for all requests. Limitations: - Product Limit: The API supports a maximum of 10000 products per request. - Rate Limit: The API enforces a rate limit of 100 requests per minute. Recommendations: - Chunking: Even if Product API supports a maximum of 10000 products per request, it is recommended to send requests in smaller chunks to avoid timeouts. - Product Requests: Use bulk operations for importing multiple products and avoid making multiple single import requests. ``` -------------------------------- ### Reb2b Marketing Integration Source: https://videowise.com/blog Loads and initializes the Reb2b marketing script. It defines methods for identifying users and collecting data, then loads the script from a specified S3 bucket. ```javascript !function() { var reb2b = window.reb2b = window.reb2b || []; if (reb2b.invoked) return; reb2b.invoked = true; reb2b.methods = ["identify", "collect"]; reb2b.factory = function(method) { return function() { var args = Array.prototype.slice.call(arguments); args.unshift(method); reb2b.push(args); return reb2b; }; }; for (var i = 0; i < reb2b.methods.length; i++) { var key = reb2b.methods[i]; reb2b[key] = reb2b.factory(key); } reb2b.load = function(key) { var script = document.createElement("script"); script.type = "text/javascript"; script.async = true; script.src = "https://s3-us-west-2.amazonaws.com/b2bjsstore/b/" + key + "/reb2b.js.gz"; var first = document.getElementsByTagName("script")[0]; first.parentNode.insertBefore(script, first); }; reb2b.SNIPPET_VERSION = "1.0.1"; reb2b.load("QOQRJHYKPY62"); }(); ``` -------------------------------- ### Reb2b Snippet Initialization Source: https://videowise.com/find-a-partner Initializes the Reb2b (likely a B2B analytics or marketing tool) snippet. It defines methods for identifying users and collecting data, then loads the necessary script. ```javascript !function () {var reb2b = window.reb2b = window.reb2b || [];if (reb2b.invoked) return;reb2b.invoked = true;reb2b.methods = ["identify", "collect"];reb2b.factory = function (method) {return function () {var args = Array.prototype.slice.call(arguments);args.unshift(method);reb2b.push(args);return reb2b;};};for (var i = 0; i < reb2b.methods.length; i++) {var key = reb2b.methods[i];reb2b[key] = reb2b.factory(key);}reb2b.load = function (key) {var script = document.createElement("script");script.type = "text/javascript";script.async = true;script.src = "https://s3-us-west-2.amazonaws.com/b2bjsstore/b/" + key + "/reb2b.js.gz";var first = document.getElementsByTagName("script")[0];first.parentNode.insertBefore(script, first);};reb2b.SNIPPET_VERSION = "1.0.1";reb2b.load("QOQRJHYKPY62");}(); ``` -------------------------------- ### General Website Styling Source: https://videowise.com/blog Contains various CSS rules for styling navigation menus, headers, and specific elements like badges. Includes responsive adjustments for different screen sizes. ```css item.has-submenu.active .li-2 a { color: #8E7DCF !important; font-size: 14px; font-style: normal; font-weight: 400; line-height: 100%; letter-spacing: 0.42px; text-transform: uppercase; padding: 0 !important; margin-bottom: 12px; border: none !important; } .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 .menu-item.has-submenu.active .menu-black-container-3 a { color: #E5E8E8 !important; font-size: 12px; font-style: normal; font-weight: 400; line-height: 30px; letter-spacing: 1px; text-transform: uppercase; padding: 0 !important; margin-bottom: 0; border: none !important; } .header-v5 .submenu.level-3 { height: 100%; } .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 .menu-item { margin: 0 !important; } #anim-1 li:nth-of-type(1) .level-2 .li-2:nth-of-type(2)>a { display: none !important; } #anim-1 li:nth-of-type(1) .level-2 .li-2:nth-of-type(3) { display: none !important; } .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 li:nth-of-type(2) .level-2 li:nth-of-type(2).li-2.menu-item, .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 li:nth-of-type(4) .level-2 li:nth-of-type(2).li-2.menu-item, .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 li:nth-of-type(2) .level-2 li:nth-of-type(3).li-2.menu-item, .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 li:nth-of-type(4) .level-2 li:nth-of-type(3).li-2.menu-item { padding-top: 24px !important; } .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 { max-height: calc(100vh - 217px); overflow-y: auto; padding-bottom: 20px; } .new-open.header.is-menu-open #main-navigation .mobile-bts .navigation-primary .submenu.level-1>li:nth-last-of-type(2) a { border-radius: 100px; border: 1px solid rgba(255, 255, 255, 0.30); background: rgba(255, 255, 255, 0.80) !important; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); color: #000 !important; font-size: 16px; font-style: normal; font-weight: 600; line-height: 24px; letter-spacing: 1px; text-transform: uppercase; padding: 12px 32px !important; } .new-open.header.is-menu-open #main-navigation .mobile-bts .navigation-primary .submenu.level-1>li:last-child a { border-radius: 100px; padding: 12px 32px !important; color: #000 !important; margin: 0; } .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1>li:last-child a .arrow-icon { display: none !important; } .new-open #main-navigation { background: transparent !important; } .new-open.header.is-menu-open #main-navigation.navigation-primary .mobile-bts .navigation-primary .submenu.level-1>li:last-child, .new-open.header.is-menu-open #main-navigation.navigation-primary .mobile-bts .navigation-primary .submenu.level-1>li:nth-last-of-type(2) { display: block !important; } .new-open.header.is-menu-open #main-navigation .mobile-bts .navigation-primary .submenu.level-1 { margin-top: 0 !important; padding: 0; top: unset; height: 130px; bottom: 0; } .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1>li:nth-last-of-type(2) { position: fixed; bottom: 80px; } .open-menu-v5.header-v5.is-menu-open::after { display: none; } .new-open.header.is-menu-open #main-navigation .navigation-primary .submenu.level-1 .li-1.menu-item:nth-of-type(2) { display: none !important; } } @media screen and (max-width:1024px) { .body-pricing { overflow: hidden; } } .videowise-background.videowise-background.vw--background-widget-contain { background-size: contain !important; } .videowise-background.vw--background-widget-contain video { display: block; max-height: 100%; } .find-partner .header-v5, .BlogSectionV5 .header-v5 { border-bottom: 1.5px solid rgba(255, 255, 255, 0.16) !important; background-color: rgba(0, 0, 0, 0.75) !important; backdrop-filter: blur(40px) !important; -webkit-backdrop-filter: blur(40px) !important; } .badge { background: #58fddf; color: black; border-radius: 7px; padding-top: 3px; padding-left: 6px; padding-right: 6px; line-height: 12px; padding-bottom: 1px; } ``` -------------------------------- ### Videowise Platform Configuration Source: https://videowise.com/find-a-partner Sets global JavaScript variables for Videowise platform configuration, including settings for cart behavior, domain forcing, video player, and Shopify integration details. ```javascript var SKIP_CART = true; var FORCE_DOMAIN = true; var VIDEOWISE_FAST_INLINE_VIDEO_PLAYER = true; var Shopify = { shop: 'f03dee-4.myshopify.com', currency: { active: 'USD', rate: '1.0' } }; var __st = { rid: null, p: 'home' }; ``` -------------------------------- ### Shopify Configuration Variables Source: https://videowise.com/faq Defines key configuration variables for a Shopify store integration. These include flags for cart behavior, domain forcing, and inline video player optimization, along with currency settings. ```javascript var SKIP_CART = true; var FORCE_DOMAIN = true; var VIDEOWISE_FAST_INLINE_VIDEO_PLAYER = true; var Shopify = { shop: 'f03dee-4.myshopify.com', currency: { active: 'USD', rate: '1.0' } }; var __st = { rid: null, p: 'home' }; ``` -------------------------------- ### Videowise Global Configuration Source: https://videowise.com/blog Sets global JavaScript variables for Videowise, including flags for cart skipping, domain forcing, fast inline video player, and Shopify store details. ```javascript var SKIP_CART = true; var FORCE_DOMAIN = true; var VIDEOWISE_FAST_INLINE_VIDEO_PLAYER = true; var Shopify = { shop: 'f03dee-4.myshopify.com', currency: { active: 'USD', rate: '1.0' } }; var __st = { rid: null, p: 'home' }; ``` -------------------------------- ### HubSpot Form Initialization Source: https://videowise.com/blog Initializes HubSpot forms on the page. It configures portal ID, form ID, and other settings for embedding forms. Multiple instances are present for different form placements. ```javascript var hsVars = hsVars || {}; hsVars['language'] = 'en'; var options = { portalId: '20080100', formId: '58b31e54-a774-417b-88fa-f3b35eb860df', formInstanceId: '8425', pageId: '47492711823', region: 'na1', inlineMessage: "
Thank you, <\/strong><\/div>\n
we will be in touch!<\/strong><\/div>", rawInlineMessage: "
Thank you, <\/strong><\/div>\n
we will be in touch!<\/strong><\/div>", hsFormKey: "229f704acac11559a9d0895ce62930a5", css: '', target: '#hs_form_target_form_795009169', contentType: "listing-page", formsBaseUrl: '/_hcms/forms/', formData: { cssClass: 'hs-form stacked hs-custom-form' } }; options.getExtraMetaDataBeforeSubmit = function() { var metadata = {}; if (hbspt.targetedContentMetadata) { var count = hbspt.targetedContentMetadata.length; var targetedContentData = []; for (var i = 0; i < count; i++) { var tc = hbspt.targetedContentMetadata[i]; if ( tc.length !== 3) { continue; } targetedContentData.push({ definitionId: tc[0], criterionId: tc[1], smartTypeId: tc[2] }); } metadata["targetedContentMetadata"] = JSON.stringify(targetedContentData); } return metadata; }; hbspt.forms.create(options); ``` ```javascript var options = { portalId: '20080100', formId: '58b31e54-a774-417b-88fa-f3b35eb860df', formInstanceId: '8845', pageId: '47492711823', region: 'na1', inlineMessage: "
Thank you, <\/strong><\/div>\n
we will be in touch!<\/strong><\/div>", rawInlineMessage: "
Thank you, <\/strong><\/div>\n
we will be in touch!<\/strong><\/div>", hsFormKey: "36df229eec8e8672698b09be334b5efc", css: '', target: '#hs_form_target_form_181419828', contentType: "listing-page", formsBaseUrl: '/_hcms/forms/', formData: { cssClass: 'hs-form stacked hs-custom-form' } }; options.getExtraMetaDataBeforeSubmit = function() { var metadata = {}; if (hbspt.targetedContentMetadata) { var count = hbspt.targetedContentMetadata.length; var targetedContentData = []; for (var i = 0; i < count; i++) { var tc = hbspt.targetedContentMetadata[i]; if ( tc.length !== 3) { continue; } targetedContentData.push({ definitionId: tc[0], criterionId: tc[1], smartTypeId: tc[2] }); } metadata["targetedContentMetadata"] = JSON.stringify(targetedContentData); } return metadata; }; hbspt.forms.create(options); ``` -------------------------------- ### Render Inline Widgets on Product Page Source: https://docs.videowise.com/init This snippet shows how to render inline widgets, like stories or carousels, on a product page. It requires a specific HTML container and uses the `initVideowiseBulk` function with product-specific parameters. The `productId` and `device` (optional) are key inputs. ```javascript initVideowiseBulk({ shop: 'your-store.myshopify.com'; widgetIds: ['widget-id']; productId: 'shopify product id'; device: 'DESKTOP' | 'MOBILE'; //optional }) ``` -------------------------------- ### Roboto Font Definitions Source: https://videowise.com/blog CSS @font-face rules to load the Roboto font with various weights (300, 400, 700, 800) using WOFF2 and WOFF formats for optimal web performance and display. ```css @font-face { font-family: "Roboto"; font-weight: 800; font-style: normal; font-display: swap; src: url("/_hcms/googlefonts/Roboto/800.woff2") format("woff2"), url("/_hcms/googlefonts/Roboto/800.woff") format("woff"); } @font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap; src: url("/_hcms/googlefonts/Roboto/700.woff2") format("woff2"), url("/_hcms/googlefonts/Roboto/700.woff") format("woff"); } @font-face { font-family: "Roboto"; font-weight: 300; font-style: normal; font-display: swap; src: url("/_hcms/googlefonts/Roboto/300.woff2") format("woff2"), url("/_hcms/googlefonts/Roboto/300.woff") format("woff"); } @font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap; src: url("/_hcms/googlefonts/Roboto/regular.woff2") format("woff2"), url("/_hcms/googlefonts/Roboto/regular.woff") format("woff"); } ```