diff --git a/r3f/README.md b/r3f/README.md
index 140b2e5..9af1211 100644
--- a/r3f/README.md
+++ b/r3f/README.md
@@ -8,8 +8,8 @@ Import the ZestyBanner component and add it to the scene like so:
```js
```
diff --git a/utils/helpers.d.ts b/utils/helpers.d.ts
index f879411..7bcd409 100644
--- a/utils/helpers.d.ts
+++ b/utils/helpers.d.ts
@@ -42,5 +42,5 @@ export function checkUserPlatform(): Promise<{
}>;
export function openURL(url: any): void;
export function urlContainsUTMParams(url: any): boolean;
-export function appendUTMParams(url: any, spaceId: any): string;
+export function appendUTMParams(url: any, adUnitId: any): string;
export function visibilityCheck(bbMin: number[], bbMax: number[], cameraProjMatrix: number[], cameraWorldMatrix: number[]): boolean;
diff --git a/utils/helpers.js b/utils/helpers.js
index f2d4b5c..d5c2e71 100644
--- a/utils/helpers.js
+++ b/utils/helpers.js
@@ -156,11 +156,11 @@ const urlContainsUTMParams = (url) => {
return url.indexOf('utm_source=') !== -1 || url.indexOf('utm_campaign=') !== -1 || url.indexOf('utm_channel=') !== -1;
}
-const appendUTMParams = (url, spaceId) => {
+const appendUTMParams = (url, adUnitId) => {
let new_url = new URL(url)
new_url.searchParams.set('utm_source', 'ZestyMarket');
new_url.searchParams.set('utm_campaign', 'ZestyCampaign');
- new_url.searchParams.set('utm_channel', `SpaceId_${spaceId}`);
+ new_url.searchParams.set('utm_channel', `AdUnitId_${adUnitId}`);
return new_url.href;
}
diff --git a/utils/networking.d.ts b/utils/networking.d.ts
index be62235..3f9886b 100644
--- a/utils/networking.d.ts
+++ b/utils/networking.d.ts
@@ -1,9 +1,9 @@
export function fetchCampaignAd(adUnitId: any, format?: string, style?: string): Promise;
/**
- * Increment the on-load event count for the space
- * @param {string} spaceId The space ID
+ * Increment the on-load event count for the ad unit
+ * @param {string} adUnitId The ad unit ID
* @returns A Promise representing the POST request
*/
-export function sendOnLoadMetric(spaceId: string, campaignId?: any): Promise;
-export function sendOnClickMetric(spaceId: any, campaignId?: any): Promise;
-export function analyticsSession(spaceId: any, campaignId: any): Promise;
+export function sendOnLoadMetric(adUnitId: string, campaignId?: any): Promise;
+export function sendOnClickMetric(adUnitId: any, campaignId?: any): Promise;
+export function analyticsSession(adUnitId: any, campaignId: any): Promise;
diff --git a/utils/networking.js b/utils/networking.js
index 783d4d0..b3174e0 100644
--- a/utils/networking.js
+++ b/utils/networking.js
@@ -206,17 +206,17 @@ Check https://docs.zesty.xyz/guides/developers/ad-units for more information.`);
}
/**
- * Increment the on-load event count for the space
- * @param {string} spaceId The space ID
+ * Increment the on-load event count for the ad unit
+ * @param {string} adUnit The ad unit ID
* @returns A Promise representing the POST request
*/
-const sendOnLoadMetric = async (spaceId, campaignId = null) => {
+const sendOnLoadMetric = async (adUnitId, campaignId = null) => {
const { platform, confidence } = await checkUserPlatform();
try {
await axios.post(
BEACON_GRAPHQL_URI,
- { query: `mutation { increment(eventType: visits, spaceId: \"${spaceId}\", campaignId: \"${campaignId}\", platform: { name: ${platform}, confidence: ${confidence} }) { message } }` },
+ { query: `mutation { increment(eventType: visits, spaceId: \"${adUnitId}\", campaignId: \"${campaignId}\", platform: { name: ${platform}, confidence: ${confidence} }) { message } }` },
{ headers: { 'Content-Type': 'application/json' } }
)
} catch (e) {
@@ -224,13 +224,13 @@ const sendOnLoadMetric = async (spaceId, campaignId = null) => {
}
};
-const sendOnClickMetric = async (spaceId, campaignId = null) => {
+const sendOnClickMetric = async (adUnitId, campaignId = null) => {
const { platform, confidence } = await checkUserPlatform();
try {
await axios.post(
BEACON_GRAPHQL_URI,
- { query: `mutation { increment(eventType: clicks, spaceId: \"${spaceId}\", campaignId: \"${campaignId}\", platform: { name: ${platform}, confidence: ${confidence} }) { message } }` },
+ { query: `mutation { increment(eventType: clicks, spaceId: \"${adUnitId}\", campaignId: \"${campaignId}\", platform: { name: ${platform}, confidence: ${confidence} }) { message } }` },
{ headers: { 'Content-Type': 'application/json' } }
)
} catch (e) {
@@ -238,12 +238,12 @@ const sendOnClickMetric = async (spaceId, campaignId = null) => {
}
}
-const analyticsSession = async (spaceId, campaignId) => {
+const analyticsSession = async (adUnitId, campaignId) => {
const { platform, confidence } = await checkUserPlatform();
try {
await axios.post(
BEACON_GRAPHQL_URI,
- { query: `mutation { increment(eventType: session, spaceId: \"${spaceId}\", campaignId: \"${campaignId}\", platform: { name: ${platform}, confidence: ${confidence} }) { message } }` },
+ { query: `mutation { increment(eventType: session, spaceId: \"${adUnitId}\", campaignId: \"${campaignId}\", platform: { name: ${platform}, confidence: ${confidence} }) { message } }` },
{ headers: { 'Content-Type': 'application/json' } }
)
} catch (e) {
diff --git a/wonderland/README.md b/wonderland/README.md
index 8887d6e..0a25924 100644
--- a/wonderland/README.md
+++ b/wonderland/README.md
@@ -43,12 +43,12 @@ Make sure that you set up a cursor to enable clicking.
## Configuring
-To set up the `zesty-banner` component, make sure to create an account and space on the market,
+To set up the `zesty-banner` component, make sure to create an account and ad unit on the market,
[find more info here](https://zestyxyz.notion.site/Docs-346d6f9aa8544cf9a5484c3ccf61523a).
1. Right-click "root" > Add Object > Mesh.
2. Set mesh to "PrimitivePlane".
3. Create a material in "Views > Resources > Materials".
4. Assign the material to your plane.
- 5. Add a `zesty-banner` component and copy your creator ID and space ID into the respective
+ 5. Add a `zesty-banner` component and copy your creator ID and ad unit ID into the respective
fields.