@sesamy/sesamy-js 1.26.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -142,7 +142,15 @@ These are the available configuration options, with their default values:
142
142
  },
143
143
  content: {
144
144
  article: {
145
- select: 'article'
145
+ article: { selector: 'article' },
146
+ image: { selector: 'img', attribute: 'src' },
147
+ title: { selector: 'h1', attribute: 'textContent' },
148
+ excerpt: { selector: 'p', attribute: 'textContent' },
149
+ price: { selector: 'article', attribute: 'data-price' },
150
+ currency: { selector: 'article', attribute: 'data-currency' },
151
+ url: { selector: 'link', attribute: 'href' },
152
+ id: { selector: 'article', attribute: 'data-id' },
153
+ pass: { selector: 'article', attribute: 'data-pass' },
146
154
  }
147
155
  },
148
156
  tranforms: {
@@ -1152,3 +1160,16 @@ The library polyfills the following methods for compatibility with older browser
1152
1160
  - The `contentType` property specifies how to interpret the `content` property: as raw HTML, a CSS selector, or a URL to fetch content from.
1153
1161
  - The `path` property can be used to apply rules conditionally based on the current URL.
1154
1162
  - The `authenticated` property ensures that rules only apply to authenticated users if set to true.
1163
+
1164
+ ## Attribution
1165
+
1166
+ The library tracks the following data for attribution purposes and pass it on to the checkout when initiating a purchase:
1167
+
1168
+ - `utm_source`: The source of the traffic.
1169
+ - `utm_medium`: The medium of the traffic.
1170
+ - `utm_campaign`: The campaign associated with the traffic.
1171
+ - `utm_term`: The term associated with the traffic.
1172
+ - `utm_content`: The content associated with the traffic.
1173
+ - `ref`: The referrer passed in the querystring.
1174
+ - `referrer`: The referrer URL of the initial page load.
1175
+ - `item-src`: The url of the last locked article viewed.