Scaffold for using Web SDK to send events for Analytics to consume, with Adobe Client Data Layer (ACDL) as the data layer.
Required extensions:
- Adobe Client Data Layer
- Adobe Experience Platform Web SDK
- Core
- Data Element Assistant
- Mapping Table
Send an email when a Google Doc's linked files are updated. |
Add this script to a Google Apps Script project. | |
See the JSdoc at `autoDeclineMeetings()` for trigger setup instructions. |
/** | |
* Add "data-link-title" to all signup modal DIVs using the DIV's inner text (or first class name if there is no innertext) | |
*/ | |
const signupModals = document.querySelectorAll('a[data-toggle="modal"][data-target="#signup"]:not([data-link-title]), div[data-toggle="modal"][data-target="#signup"]:not([data-link-title])'); | |
signupModals.forEach((signupModal) => { | |
const signupModalText = (signupModal.innerText || signupModal.textContent).trim(); | |
if (!signupModalText) { | |
// inner text not found | |
// if there's an image, use its "alt" attribute | |
const imageElement = signupModal.querySelector('img'); |
/** | |
* Add a "data-content-section-name" attribute to all page content sections. | |
* | |
* Page content sections are determined in this order: | |
* 1. Wherever there is a DIV with an "id" attribute in the container DIV. | |
* 2. DIVs that are immediate children of the container DIV. | |
* ... more methods can be added as required. | |
* | |
* In all cases, when the identified content section's DIV has a "data-content-section-name" attribute already, | |
* then that attribute is left alone. |
// Modify content.xdm or content.data as necessary. There is no need to wrap the | |
// code in a function or return a value. For example: | |
// content.xdm.web.webPageDetails.name = "Checkout"; | |
var sendHit = true; | |
switch (content.xdm.eventType) { | |
case 'web.webpagedetails.pageViews': | |
// nothing to do here | |
// keep calm and carry on |
#!/bin/bash | |
# Load RVM into a shell session *as a function* | |
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then | |
# First try to load from a user install | |
source "$HOME/.rvm/scripts/rvm" | |
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then |
// update Activity Map to determine how to get its region and link | |
s.ActivityMap.originalRegion = s.ActivityMap.region; | |
s.ActivityMap.region = function(element) { | |
if (element) { | |
// set the region based on the element's (or ancestor's) "data-section-id" attribute | |
var currentElement = element; | |
var sectionId = currentElement.getAttribute('data-section-id'); | |
while (!sectionId && (currentElement = currentElement.parentElement)) { | |
sectionId = currentElement.getAttribute('data-section-id'); | |
} |
Scaffold for using Web SDK to send events for Analytics to consume, with Adobe Client Data Layer (ACDL) as the data layer.
Required extensions:
/** | |
* Dependencies: | |
* | |
* Data elements: | |
* Experience Cloud ID Service visitor instance | |
* - extension: Core | |
* - data element type: Custom Code | |
* | |
* URL hostname: | |
* - extension: Core |