... ... (function () { const METASITE_APP_DEF_ID = '22bef345-3c5b-4c18-b782-74d4085112ff'; const getXSRFTokenFromCookie = () => { const match = new RegExp('XSRF-TOKEN=(.+?);').exec(document.cookie); return match ? match[1] : ''; }; const eventNames = { Purchase: 'Purchase', Lead: 'Lead', }; const eventNameToConversionActionCategory = { [eventNames.Purchase]: 'PURCHASE', [eventNames.Lead]: 'SUBMIT_LEAD_FORM', }; const channelParams = { price: 'price', id: 'id', currency: 'currency', name: 'name', category: 'category', brand: 'brand', variant: 'variant', list: 'list_name', quantity: 'quantity', step: 'checkout_step', option: 'checkout_option', position: 'list_position', coupon: 'coupon', affiliation: 'affiliation', revenue: 'value', tax: 'tax', sku: 'sku', shipping: 'shipping', }; const mapContents = ({ contents = [] }) => contents.map(({ currency, ...product }) => paramsMapper(product, channelParams), ); const paramsMapper = (params, mapper) => { const mappedParams = Object.keys(params); if (mappedParams.length === 0) { return params; } return mappedParams.reduce((mappedObject, currentKey) => { const newKey = mapper[currentKey]; if (newKey && (params[currentKey] || params[currentKey] === 0)) { mappedObject[newKey] = params[currentKey]; } return mappedObject; }, {}); }; const loadGtag = () => { const gtagInitScript = document.createElement('script'); gtagInitScript.type = 'text/javascript'; gtagInitScript.innerHTML = ` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()) `; document.head.appendChild(gtagInitScript); const gtagScript = document.createElement('script'); gtagScript.type = 'text/javascript'; gtagScript.setAttribute('async', 'true'); gtagScript.setAttribute('src', 'https://www.googletagmanager.com/gtag/js'); document.head.appendChild(gtagScript); }; const handleGoogleConsent = () => { window.dataLayer = window.dataLayer || []; if (window.consentPolicyManager && window.consentPolicyManager.initRan) { const { policy } = window.consentPolicyManager.getCurrentConsentPolicy(); setConsent('default', policy); } else { setConsent('default', { advertising: false, analytics: false, functional: false, waitForUpdate: 500, }); } window.document.addEventListener( 'consentPolicyInitialized', ({ detail }) => { setConsent('update', detail.policy); }, ); window.document.addEventListener('consentPolicyChanged', ({ detail }) => { setConsent('update', detail.policy); }); function setConsent( action, { advertising, analytics, functional, waitForUpdate }, ) { (function () { window.dataLayer.push(arguments); })('consent', action, { ad_storage: advertising ? 'granted' : 'denied', ad_user_data: advertising ? 'granted' : 'denied', ad_personalization: advertising ? 'granted' : 'denied', analytics_storage: analytics ? 'granted' : 'denied', functionality_storage: functional ? 'granted' : 'denied', personalization_storage: 'granted', security_storage: 'granted', ...(waitForUpdate ? { wait_for_update: waitForUpdate } : {}), }); } }; let conversionActions; const loadConversionActions = () => { const XSRFToken = getXSRFTokenFromCookie(); const headers = { 'Content-Type': 'application/json', 'X-XSRF-TOKEN': XSRFToken, }; const getAppToken = window.wixEmbedsAPI?.getAppToken; if (getAppToken) { headers.authorization = getAppToken(METASITE_APP_DEF_ID); } const metaSiteId = window.wixEmbedsAPI?.getMetaSiteId(); return fetch( `${window.location.origin}/_serverless/pa-google/v1/accounts/current-site/conversion-actions?metaSiteId=${metaSiteId}`, { method: 'GET', headers, }, ) .then((response) => response.json()) .then((data) => { conversionActions = data.conversionActions; gtag('config', conversionActions[0].conversionId); }); }; const reportEvent = (eventName, eventParams) => { const category = eventNameToConversionActionCategory[eventName]; const conversionAction = conversionActions.find( (currentConversionAction) => currentConversionAction.category.category === category, ); if (conversionAction) { let conversionData = { send_to: `${conversionAction.conversionId}/${conversionAction.conversionLabel}`, }; switch (category) { case 'PURCHASE': { const { revenue, id, currency, coupon, ...params } = eventParams; conversionData = { ...conversionData, ...paramsMapper({ revenue, id, currency, coupon }, channelParams), transactionId: eventParams.id, items: mapContents(params), }; break; } default: break; } gtag('event', 'conversion', conversionData); } }; let isBootstrapped = false; const bootstrap = () => { handleGoogleConsent(); loadGtag(); return loadConversionActions().then(() => { isBootstrapped = true; }); }; const bootstrapPromise = bootstrap(); const registerListener = () => { window.wixDevelopersAnalytics.register( 'd6708a0e-5b2a-458e-8cfe-bdca240aa2ce', (eventName, eventParams) => { if (isBootstrapped) { reportEvent(eventName, eventParams); } else { bootstrapPromise.then(() => { reportEvent(eventName, eventParams); }); } }, ); }; window.wixDevelopersAnalytics ? registerListener() : window.addEventListener('wixDevelopersAnalyticsReady', registerListener); })();
top of page

Yule

The air was clear and cold, and there was a layer of snow on the ground. As the winter solstice was coming up, the days were getting shorter and the nights were getting longer. It was dark, but it was also a time to celebrate. Yule, an old celebration of the winter solstice, was in full swing.


In the middle of the town, a big bonfire was lit, and the flames danced and popped all night. The villagers crowded around, and the warm glow lit up their faces. They wore fur and wool cloaks, and their breath could be seen in the cold air. As they sang songs and told stories, they laughed and had a good time.


A big oak log covered in holly and ivy was brought out and put on the fire. This was the Yule log. It was a sign of the light coming back, a warning that even when things look the worst, there is always hope. As the log burned and the embers burned brightly, the villagers made wishes for the coming year and sent their hopes and dreams into the world.


A big part of the Yule festival was the food. There were roasted meats, root veggies, and warm bread on the tables. The locals ate as much as they wanted and enjoyed every bite as they told stories and laughed. Mulled wine and spiced cider were flowing easily, which kept their bodies and minds warm.


As night fell, the people gathered in a circle and held hands to make a chain. They started to dance, stomping their feet in time to the beat of a drum. The people spun and twirled and sang joyful songs as the dance got faster and more lively. It was a party to celebrate life, the changing seasons, and the ties that kept the community together.


As the first rays of dawn broke through the darkness, the locals stood in awe and watched as the sun rose higher in the sky. Now that the longest night was over, the days would get longer. It was a time of growth and renewal, a time to let go of the past and look forward to the future.


The people of the village said goodbye to the winter solstice with hearts full of thanks and hope, knowing that the light would keep getting brighter each day. They took the spirit of Yule with them as a lesson that even in the darkest times, there is always a glimmer of light. And when they went back home, they brought the warmth and joy of the party with them, ready to face the difficulties of the coming year with more strength and resilience.

2 views0 comments

留言


bottom of page