### Global Variables and Native Share Setup (JavaScript) Source: https://www.qrco.au/blog/comprehensive-pro-plan Initializes global variables by reading values from input fields and sets up a native sharing feature for blog posts. This script enhances user experience by leveraging browser capabilities for sharing content. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/blog/comprehensive-pro-plan" }).catch(error => {}); }) } }) ``` -------------------------------- ### JavaScript: Global Variables and Cookie Consent Setup Source: https://www.qrco.au/pages/business-directory Initializes global JavaScript variables by reading values from DOM elements. Configures and runs the CookieConsent library, handling user consent events and sending data via navigator.sendBeacon. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; window.addEventListener('load', () => { let language_code = document.documentElement.getAttribute('lang'); let language_direction = document.documentElement.getAttribute('dir'); let translations = {}; translations[language_code] = { consentModal: { title: "We use cookies \ud83c\udf6a", description: "Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", showPreferencesBtn: "Customize", }, preferencesModal: { title: "Cookie preferences", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", savePreferencesBtn: "Save settings", closeIconLabel: "Close", sections: [ { title: "Cookie usage \ud83d\udce2", description: "We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in\/out whenever you want. For more details relative to cookies and other sensitive data, please read the full privacy policy<\/a>.", }, { title: "Strictly necessary cookies", description: "These cookies are essential for the proper functioning of my website. Without these cookies, the website would not work properly.", linkedCategory: 'necessary', } ] } }; CookieConsent.run({ categories: { necessary: { enabled: true, readOnly: true, }, analytics: {}, targeting: {}, }, language: { rtl: language_direction == 'rtl' ? language_code : null, default: language_code, autoDetect: 'document', translations }, onFirstConsent: () => { const preferences = CookieConsent.getUserPreferences(); if(!get_cookie('cookie_consent_logged')) { navigator.sendBeacon(`${url}cookie-consent`, JSON.stringify({global_token, level: preferences.acceptedCategories})); set_cookie('cookie_consent_logged', '1', 182, "/"); } }, onChange: () => { const preferences = CookieConsent.getUserPreferences(); navigator.sendBeacon(`${url}cookie-consent`, JSON.stringify({global_token, level: preferences.acceptedCategories})); set_cookie('cookie_consent_logged', '1', 182, "/"); }, guiOptions: { consentModal: { layout: "cloud", position: "top left", flipButtons: false }, preferencesModal: { layout: 'box', } }, }); }); ``` -------------------------------- ### Breadcrumb Navigation Source: https://www.qrco.au/page/sydney-qr-codes A standard breadcrumb navigation structure showing the user's current location within the website hierarchy, starting from Home, through Pages, to Services, and finally the current Page. ```html 1. [Home](https://www.qrco.au/) 2. [Pages](https://www.qrco.au/pages) 3. [Services](https://www.qrco.au/pages/services) 4. Page ``` -------------------------------- ### JavaScript: Initialize Global Variables and Native Share Source: https://www.qrco.au/page/terms-and-conditions Initializes global JavaScript variables by reading values from input fields and implements native device sharing functionality for specific elements. It checks for navigator.share support and adds an event listener to trigger the share dialog. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/page/terms-and-conditions" }).catch(error => {}); }) } }) ``` -------------------------------- ### JavaScript Global Variables and Native Share Source: https://www.qrco.au/blog/free-marketing-website-offer Initializes global JavaScript variables by reading values from input fields and implements native device sharing functionality for elements with the 'data-native-share' attribute. It checks for navigator.share support and attaches a click event listener. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/blog/free-marketing-website-offer" }).catch(error => {}); }) } }) ``` -------------------------------- ### Blog Posting Schema (JSON-LD) Source: https://www.qrco.au/blog/comprehensive-pro-plan Defines structured data for a blog post, including title, description, author, publication dates, and keywords. This enhances search engine visibility and provides rich snippets in search results. ```json-ld { "@context": "https://schema.org", "@type": "BlogPosting", "headline": "Comprehensive PRO plan", "description": "Perfect for Businesses & Professionals. Unlock the full potential of dynamic QR code marketing with our comprehensive PRO plan.", "url": "https://www.qrco.au/blog/comprehensive-pro-plan", "image": "https://www.qrco.au/uploads/blog/5319f025e259a0449da8e71b842365b0.png", "author": { "@type": "Person", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "url": "https://www.qrco.au/" }, "publisher": { "@type": "Organization", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "logo": { "@type": "ImageObject", "url": "https://www.qrco.au/uploads/main/164e974e6b9fef1ff9d7479f4f72bd60.png" } }, "datePublished": "2023-12-02T00:39:45+00:00", "dateModified": "2023-12-02T00:42:02+00:00", "keywords": "dynamic QR code marketing", "wordCount": "332", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://www.qrco.au/" } } ``` -------------------------------- ### Initialize Global Variables and Native Share Source: https://www.qrco.au/blog/url-shorterner Sets up global JavaScript variables from input fields and implements native device sharing functionality for elements with the 'data-native-share' attribute. It checks for navigator.share support and attaches a click event listener. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/blog/url-shorterner" }).catch(error => {}); }) } }) ``` -------------------------------- ### Cookie Consent Initialization Source: https://www.qrco.au/blog/free-marketing-website-offer Initializes the CookieConsent library on page load. It configures consent categories, language settings including translations for UI elements, and defines behavior for the first consent event. ```javascript window.addEventListener('load', () => { let language_code = document.documentElement.getAttribute('lang'); let language_direction = document.documentElement.getAttribute('dir'); let translations = {}; translations[language_code] = { consentModal: { title: "We use cookies \ud83c\udf6a", description: "Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", showPreferencesBtn: "Customize", }, preferencesModal: { title: "Cookie preferences", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", savePreferencesBtn: "Save settings", closeIconLabel: "Close", sections: [ { title: "Cookie usage \ud83d\udce2", description: "We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in\/out whenever you want. For more details relative to cookies and other sensitive data, please read the full privacy policy<\/a>.", }, { title: "Strictly necessary cookies", description: "These cookies are essential for the proper functioning of my website. Without these cookies, the website would not work properly.", linkedCategory: 'necessary' }, ] } }; CookieConsent.run({ categories: { necessary: { enabled: true, readOnly: true, }, analytics: {}, targeting: {}, }, language: { rtl: language_direction == 'rtl' ? language_code : null, default: language_code, autoDetect: 'document', translations }, onFirstConsent: () => { const preferences = CookieConsent.getUserPreferences(); // ... further logic based on consent preferences } }); }) ``` -------------------------------- ### Initialize Global Variables and Native Share Source: https://www.qrco.au/blog/support Initializes global JavaScript variables by extracting values from DOM input elements and sets up native sharing functionality for elements with the 'data-native-share' attribute. It checks for navigator.share support and attaches a click event listener. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/blog/support" }).catch(error => {}); }) } }) ``` -------------------------------- ### Initialize Global Variables Source: https://www.qrco.au/blog/category/offers Initializes global JavaScript variables by retrieving values from input elements on the page, such as tokens, URLs, and number formatting settings. ```JavaScript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; ``` -------------------------------- ### Google Analytics Configuration Source: https://www.qrco.au/blog/chat-gpt-website-builder These JavaScript snippets configure Google Analytics tracking for the website. They initialize the dataLayer and send configuration events for different tracking IDs. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-4R0NHZMRY0'); ``` ```javascript window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'AW-11339228997'); ``` -------------------------------- ### Initialize Global Variables and DOM Selectors Source: https://www.qrco.au/qr-reader Sets up global JavaScript variables by querying DOM elements for token, site URL, decimal point, and thousands separator. These variables are essential for application configuration and dynamic content rendering. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; ``` -------------------------------- ### Initialize Global Variables and Native Share Source: https://www.qrco.au/blog/qr-codes-revolutionizing-digital-marketing-2024 Initializes global JavaScript variables by fetching values from DOM input elements and sets up a native share functionality for elements with the 'data-native-share' attribute, leveraging the Web Share API. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/blog/qr-codes-revolutionizing-digital-marketing-2024" }).catch(error => {}); }) } }) ``` -------------------------------- ### Global Variables and Native Share Functionality Source: https://www.qrco.au/blog/9-ways-your-business-can-use-qr-codes Initializes global JavaScript variables by querying DOM elements and implements a native share feature for elements with the 'data-native-share' attribute, leveraging the Web Share API. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/blog/9-ways-your-business-can-use-qr-codes" }).catch(error => {}); }) } }) ``` -------------------------------- ### Schema.org BlogPosting Markup Source: https://www.qrco.au/blog/free-marketing-website-offer Defines structured data for a blog post using Schema.org's BlogPosting type. It includes details like headline, description, URL, image, author, publisher, and publication dates, enhancing SEO. ```json-ld { "@context": "https://schema.org", "@type": "BlogPosting", "headline": "Exclusive Offer: Free Marketing Website with Annual Subscription at QRco.au!", "description": "Jumpstart your digital presence with QRco.au! Subscribe to our annual plan today and receive a free basic marketing website designed to connect with your audience and enhance your online visibility.", "url": "https://www.qrco.au/blog/free-marketing-website-offer", "image": "https://www.qrco.au/uploads/blog/e35613e558ba53a75070e755bd21a03d.jpeg", "author": { "@type": "Person", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "url": "https://www.qrco.au/" }, "publisher": { "@type": "Organization", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "logo": { "@type": "ImageObject", "url": "https://www.qrco.au/uploads/main/164e974e6b9fef1ff9d7479f4f72bd60.png" } }, "datePublished": "2024-04-22T06:55:22+00:00", "dateModified": "2025-07-26T23:29:55+00:00", "keywords": "", "wordCount": "510", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://www.qrco.au/" } } ``` -------------------------------- ### Initialize Global Variables and DOM Selectors Source: https://www.qrco.au/barcode-reader Sets up global JavaScript variables by querying DOM elements for token, site URL, decimal point, and thousands separator. These variables are essential for application configuration and dynamic content rendering. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; ``` -------------------------------- ### Initialize Cookie Consent Module Source: https://www.qrco.au/blog/chat-gpt-website-builder Initializes the cookie consent module with specific GUI options and event handlers. It uses `set_cookie` for persistent storage and `navigator.sendBeacon` to asynchronously send user preference data to a specified URL. Dependencies include a `CookieConsent` object, a `url` variable, and `global_token`. ```javascript CookieConsent.init({ onChange: () => { const preferences = CookieConsent.getUserPreferences(); navigator.sendBeacon(`${url}cookie-consent`, JSON.stringify({global_token, level: preferences.acceptedCategories})); set_cookie('cookie_consent_logged', '1', 182, "\/"); }, guiOptions: { consentModal: { layout: "cloud", position: "top left", flipButtons: false }, preferencesModal: { layout: 'box' } } }); ``` -------------------------------- ### Website Navigation Links Source: https://www.qrco.au/blog/category/qrcode-basics A list of navigation links for the website, including primary actions like creating QR codes and barcodes, accessing the blog, pricing, and user authentication. ```html ``` -------------------------------- ### CookieConsent Library Configuration Source: https://www.qrco.au/blog/category/usecases Configures and runs the CookieConsent library on page load. It sets up consent categories, language preferences, translations, and event handlers for consent changes, including sending data via navigator.sendBeacon. ```APIDOC CookieConsent.run(options) Initializes and displays the cookie consent banner based on the provided configuration. Parameters: options (object): Configuration object for the CookieConsent library. categories (object): Defines the cookie categories and their properties. necessary (object): Strictly necessary cookies. enabled (boolean): Must be true. readOnly (boolean): Must be true. analytics (object): Analytics cookies. targeting (object): Targeting cookies. language (object): Language and localization settings. rtl (string | null): Specifies the right-to-left language code if applicable, otherwise null. default (string): The default language code for the UI. autoDetect (string): Strategy for auto-detecting language ('document' or 'browser'). translations (object): A map of language codes to translation objects. [language_code] (object): Translation details for a specific language. consentModal (object): Translations for the consent modal. title (string): Title of the consent modal. description (string): Description text for the consent modal. acceptAllBtn (string): Text for the 'Accept All' button. acceptNecessaryBtn (string): Text for the 'Reject All' button. showPreferencesBtn (string): Text for the 'Show Preferences' button. preferencesModal (object): Translations for the preferences modal. title (string): Title of the preferences modal. acceptAllBtn (string): Text for the 'Accept All' button. acceptNecessaryBtn (string): Text for the 'Reject All' button. savePreferencesBtn (string): Text for the 'Save Settings' button. closeIconLabel (string): Label for the close icon. sections (array): Array of sections within the preferences modal. (object): A section object. title (string): Title of the section. description (string): Description of the section. linkedCategory (string): The category linked to this section. onFirstConsent (function): Callback function executed when the user gives consent for the first time. Parameters: preferences (object): The user's consent preferences. onChange (function): Callback function executed whenever the user's consent preferences change. Parameters: preferences (object): The user's current consent preferences. guiOptions (object): Options for customizing the UI layout and appearance. consentModal (object): Options for the consent modal. layout (string): Layout style (e.g., 'cloud'). position (string): Position on the screen (e.g., 'top left'). flipButtons (boolean): Whether to flip the order of buttons. preferencesModal (object): Options for the preferences modal. layout (string): Layout style (e.g., 'box'). Example Usage: window.addEventListener('load', () => { let language_code = document.documentElement.getAttribute('lang'); let language_direction = document.documentElement.getAttribute('dir'); let translations = {}; translations[language_code] = { consentModal: { title: "We use cookies \ud83c\udf6a", description: "Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", showPreferencesBtn: "Customize", }, preferencesModal: { title: "Cookie preferences", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", savePreferencesBtn: "Save settings", closeIconLabel: "Close", sections: [ { title: "Cookie usage \ud83d\udce2", description: "We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in\/out whenever you want. For more details relative to cookies and other sensitive data, please read the full privacy policy<\/a>.", }, { title: "Strictly necessary cookies", description: "These cookies are essential for the proper functioning of my website. Without these cookies, the website would not work properly.", linkedCategory: 'necessary' }, ] } }; CookieConsent.run({ categories: { necessary: { enabled: true, readOnly: true }, analytics: {}, targeting: {}, }, language: { rtl: language_direction == 'rtl' ? language_code : null, default: language_code, autoDetect: 'document', translations }, onFirstConsent: () => { const preferences = CookieConsent.getUserPreferences(); if(!get_cookie('cookie_consent_logged')) { navigator.sendBeacon(`${url}cookie-consent`, JSON.stringify({global_token, level: preferences.acceptedCategories})); set_cookie('cookie_consent_logged', '1', 182, "/"); } }, onChange: () => { const preferences = CookieConsent.getUserPreferences(); navigator.sendBeacon(`${url}cookie-consent`, JSON.stringify({global_token, level: preferences.acceptedCategories})); set_cookie('cookie_consent_logged', '1', 182, "/"); }, guiOptions: { consentModal: { layout: "cloud", position: "top left", flipButtons: false }, preferencesModal: { layout: 'box', } } }); }); // Helper functions (assumed to be defined elsewhere) // function get_cookie(name) { ... } // function set_cookie(name, value, days, path) { ... } ``` -------------------------------- ### JavaScript Native Share API Source: https://www.qrco.au/blog/chat-gpt-website-builder Implements native sharing functionality for blog posts using the Web Share API. It checks for navigator.share support and attaches click event listeners to elements with 'data-native-share' attribute. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/blog/chat-gpt-website-builder" }).catch(error => {}); }) } }) ``` -------------------------------- ### Cookie Consent Initialization and Configuration Source: https://www.qrco.au/blog/category/qrcode-basics Initializes the CookieConsent library on page load, configuring language, consent categories, and event handlers for user consent actions. It sends consent status via navigator.sendBeacon. ```javascript window.addEventListener('load', () => { let language_code = document.documentElement.getAttribute('lang'); let language_direction = document.documentElement.getAttribute('dir'); let translations = {}; translations[language_code] = { consentModal: { title: "We use cookies \ud83c\udf6a", description: "Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", showPreferencesBtn: "Customize", }, preferencesModal: { title: "Cookie preferences", acceptAllBtn: "Accept all", acceptNecessaryBtn: "Reject all", savePreferencesBtn: "Save settings", closeIconLabel: "Close", sections: [ { title: "Cookie usage \ud83d\udce2", description: "We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in\/out whenever you want. For more details relative to cookies and other sensitive data, please read the full privacy policy<\/a>.", }, { title: "Strictly necessary cookies", description: "These cookies are essential for the proper functioning of my website. Without these cookies, the website would not work properly.", linkedCategory: 'necessary' }, ] } }; CookieConsent.run({ categories: { necessary: { enabled: true, readOnly: true, }, analytics: {}, targeting: {}, }, language: { rtl: language_direction == 'rtl' ? language_code : null, default: language_code, autoDetect: 'document', translations }, onFirstConsent: () => { const preferences = CookieConsent.getUserPreferences(); if(!get_cookie('cookie_consent_logged')) { navigator.sendBeacon(`${url}cookie-consent`, JSON.stringify({global_token, level: preferences.acceptedCategories})); set_cookie('cookie_consent_logged', '1', 182, "/"); } }, onChange: () => { const preferences = CookieConsent.getUserPreferences(); navigator.sendBeacon(`${url}cookie-consent`, JSON.stringify({global_token, level: preferences.acceptedCategories})); set_cookie('cookie_consent_logged', '1', 182, "/"); }, guiOptions: { consentModal: { layout: "cloud", position: "top left", flipButtons: false }, preferencesModal: { layout: 'box', } }, }); }); ``` -------------------------------- ### Schema.org - SoftwareApplication Source: https://www.qrco.au/plan Defines the qrco.au website as a SoftwareApplication using Schema.org vocabulary. It includes the application name, description, category, operating system, URL, image, and details about available offers (plans) with their pricing and availability. ```json-ld { "@context": "https://schema.org", "@type": "SoftwareApplication", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "description": "QR Code Generator", "applicationCategory": "WebApplication", "operatingSystem": "All", "url": "https://www.qrco.au/", "image": "https://www.qrco.au/uploads/main/164e974e6b9fef1ff9d7479f4f72bd60.png", "offers": [ { "@type": "Offer", "name": "FREE", "availability": "https://schema.org/InStock", "url": "https://www.qrco.au/plan" }, { "@type": "Offer", "name": "Custom", "availability": "https://schema.org/InStock", "url": "https://www.qrco.au/plan" }, { "@type": "Offer", "name": "Pro - Annual", "price": "199", "priceCurrency": "AUD", "availability": "https://schema.org/InStock", "url": "https://www.qrco.au/pay/2" } ] } ``` -------------------------------- ### Schema.org BlogPosting JSON Source: https://www.qrco.au/blog/chat-gpt-website-builder Provides structured data for a blog post using Schema.org's BlogPosting type. This includes metadata like headline, author, date, and URL for SEO purposes. ```json { "@context": "https://schema.org", "@type": "BlogPosting", "headline": "Introducing the Chat GPT Website Builder Service by qrco.au", "description": "Learn how qrco.au is revolutionizing website creation by offering a new service: website building using ChatGPT, powered by advanced AI technology.", "url": "https://www.qrco.au/blog/chat-gpt-website-builder", "image": "https://www.qrco.au/uploads/blog/b27c3a17945dcfafcc5c7c53e0a44678.webp", "author": { "@type": "Person", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "url": "https://www.qrco.au/" }, "publisher": { "@type": "Organization", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "logo": { "@type": "ImageObject", "url": "https://www.qrco.au/uploads/main/164e974e6b9fef1ff9d7479f4f72bd60.png" } }, "datePublished": "2024-09-02T04:12:51+00:00", "dateModified": "2025-07-26T23:29:46+00:00", "keywords": "", "wordCount": "552", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://www.qrco.au/" } } ``` -------------------------------- ### Google Analytics Tracking Source: https://www.qrco.au/blog/free-marketing-website-offer JavaScript code for initializing and configuring Google Analytics tracking. It sets up the dataLayer and pushes configuration events for both Universal Analytics and Google Analytics 4 properties. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-4R0NHZMRY0'); window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-11339228997'); ``` -------------------------------- ### Google Ads Conversion Tracking Code Source: https://www.qrco.au/blog/9-ways-your-business-can-use-qr-codes This JavaScript snippet is used to initialize Google Ads conversion tracking for the website. It sets up the data layer and configures the ads account. ```javascript window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'AW-11339228997'); ``` -------------------------------- ### Schema.org BlogPosting Markup Source: https://www.qrco.au/blog/9-ways-your-business-can-use-qr-codes Defines structured data for a blog post, including its headline, description, URL, image, author, publisher, publication date, modification date, and keywords. This helps search engines understand and display the content effectively. ```json-ld { "@context": "https://schema.org", "@type": "BlogPosting", "headline": "9 Ways Your Business Can Use QR Codes", "description": "", "url": "https://www.qrco.au/blog/9-ways-your-business-can-use-qr-codes", "image": "https://www.qrco.au/uploads/blog/ab4c905a511428d2675261760aba25ac.png", "author": { "@type": "Person", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "url": "https://www.qrco.au/" }, "publisher": { "@type": "Organization", "name": "Australia's ultimate QR Code Generator & URL Shortener - qrco.au | 'QR Code' is a trademark of DENSO WAVE INCORPORATED", "logo": { "@type": "ImageObject", "url": "https://www.qrco.au/uploads/main/164e974e6b9fef1ff9d7479f4f72bd60.png" } }, "datePublished": "2023-01-19T21:57:38+00:00", "dateModified": "2025-07-26T23:30:09+00:00", "keywords": "business,qr codes,free qr code generator,qr codes australia", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://www.qrco.au/" } } ``` -------------------------------- ### Global Variable Initialization Source: https://www.qrco.au/blog/category/usecases Initializes global JavaScript variables by retrieving values from DOM elements. These variables store essential site configuration like tokens, URLs, and number formatting settings. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; ``` -------------------------------- ### Initialize Global Variables and Native Share Source: https://www.qrco.au/page/about-qrco-au Sets up global JavaScript variables by reading values from input fields and implements a native sharing feature for supported elements. It checks for navigator.share availability and attaches a click listener to trigger the share dialog. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; document.querySelectorAll('[data-native-share]').forEach(element => { if(navigator.share) { element.classList.remove('d-none'); element.addEventListener('click', event => { navigator.share({ title: document.title, url: "https://www.qrco.au/page/about-qrco-au" }).catch(error => {}); }) } }) ``` -------------------------------- ### Google Analytics and Tag Manager Initialization Source: https://www.qrco.au/blog/category/usecases This JavaScript code initializes Google Analytics and Google Tag Manager tracking. It ensures that dataLayer is available and pushes configuration commands to the respective services for website analytics and advertising. ```javascript window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-4R0NHZMRY0'); window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'AW-11339228997'); ``` -------------------------------- ### Initialize Global JavaScript Variables Source: https://www.qrco.au/blog/category/qrcode-basics Reads essential configuration values like tokens, URLs, and number formatting from hidden input fields in the DOM. These variables are used throughout the application for various functionalities. ```javascript /* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let site_url = document.querySelector('input[name="global_site_url"]').value; let url = document.querySelector('input[name="global_url"]').value; let decimal_point = document.querySelector('[name="global_number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="global_number_thousands_separator"]').value; ``` -------------------------------- ### Breadcrumb Schema (JSON-LD) Source: https://www.qrco.au/blog/comprehensive-pro-plan Provides structured data for breadcrumb navigation, helping search engines understand the website's hierarchy and improving SEO. This schema defines the path from the homepage to the current blog post. ```json-ld { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "name": "QR code generator", "item": "https://www.qrco.au/" }, { "@type": "ListItem", "position": 2, "name": "Blog", "item": "https://www.qrco.au/blog" }, { "@type": "ListItem", "position": 3, "name": "Comprehensive PRO plan", "item": "https://www.qrco.au/blog/comprehensive-pro-plan" } ] } ``` -------------------------------- ### CSS Variables for Theming Source: https://www.qrco.au/blog/free-marketing-website-offer Defines CSS custom properties (variables) for theming the website's appearance, including font families, background colors, border colors, and button styles. It also includes a dark mode variant. ```css :root { --cc-font-family: inherit; --cc-bg: hsla(0, 0%, 100%, 90%); --cc-separator-border-color: transparent; --cc-modal-border-radius: var(--border-radius); --cc-btn-border-radius: var(--border-radius); --cc-primary-color:var(--gray-700); --cc-secondary-color:var(--gray-600); --cc-btn-primary-color: var(--white); --cc-btn-primary-bg: var(--primary); --cc-btn-primary-hover-bg: var(--primary-600); --cc-btn-primary-color-bg: var(--white); --cc-btn-primary-hover-color: var(--white); --cc-btn-secondary-bg:var(--gray-300); --cc-btn-secondary-hover-bg:var(--gray-400); --cc-btn-secondary-hover-color: var(--black); --cc-btn-secondary-hover-border-color: var(--cc-btn-secondary-hover-bg); } .cc--darkmode { --cc-bg: hsla(0, 0%, 0%, 90%); --cc-separator-border-color: transparent; } ```