Skip to content

Commit 3a9ed41

Browse files
committed
docs: update readme
1 parent a2dd215 commit 3a9ed41

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ The project is a proof of concept for integrating Target VEC with Helix.
55
- Preview: https://main--helix-target-integration--adobe-rnd.hlx.page/
66
- Live: https://main--helix-target-integration--adobe-rnd.hlx.live/
77

8+
## Adding Target integration to a Helix project
9+
1. Copy the [`scripts/target.js`](scripts/target.js) to your project.
10+
2. Add a call to `loadTargetOffers` to the 'loadPage' function as follows:
11+
```js
12+
async function loadPage() {
13+
loadTargetOffers('{Target Client Code}');
14+
await loadEager(document);
15+
await loadLazy(document);
16+
loadDelayed();
17+
}
18+
```
19+
820
## CDN setup
921
We recommend using Cloudflare Workers to proxy all upstream requests to the Target and Helix origins.
1022
This allows you to use the same domain for both Helix and Target, which is required for archiving the best performance.

0 commit comments

Comments
 (0)