You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/includes/_debugging.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,14 @@
3
3
> Example Implementation:
4
4
5
5
```javascript
6
-
(WIAPI=> {
7
-
constAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
6
+
(asyncAPILoader=> {
7
+
constAPI=awaitAPILoader.create();
8
8
API.subscribe('page-load-v1', ev=> {
9
9
if (ev.payload.searchPage) {
10
10
API.log('My integration has loaded and this is a search results page.');
11
11
}
12
12
});
13
-
})(window.DDC.API);
13
+
})(window.DDC.APILoader);
14
14
```
15
15
16
16
When developing an integration, it's helpful to know if the API is doing what you expect and if your code is running successfully. The API intentionally suppresses most errors in regular use cases, however you can opt to view the error messages and API events by adding the following URL parameter to any page of any Dealer.com web site:
@@ -156,7 +156,7 @@ This element is positioned below the vehicle pricing area on vehicle search and
156
156
});
157
157
}
158
158
});
159
-
})(window.DDC.API);
159
+
})(window.DDC.APILoader);
160
160
```
161
161
162
162
This element is the media gallery container on vehicle details pages. Injecting into this location will replace the media gallery with the elements you insert.
@@ -166,20 +166,20 @@ This element is the media gallery container on vehicle details pages. Injecting
166
166
> Usage:
167
167
168
168
```javascript
169
-
(WIAPI=> {
170
-
constAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
169
+
(asyncAPILoader=> {
170
+
constAPI=awaitAPILoader.create();
171
171
API.insert('primary-banner', (elem, meta) => {
172
172
// This element is typically positioned in a prominent location above the vehicle listings on the Search Results Page.
173
173
// On the Details page, it is near the top of the vehicle information, below the media gallery.
174
174
});
175
-
})(window.DDC.API);
175
+
})(window.DDC.APILoader);
176
176
```
177
177
178
178
> Example Implementation:
179
179
180
180
```javascript
181
-
(WIAPI=> {
182
-
constAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
181
+
(asyncAPILoader=> {
182
+
constAPI=awaitAPILoader.create();
183
183
API.subscribe('page-load-v1', ev=> {
184
184
if (ev.payload.searchPage||ev.payload.detailPage) {
185
185
API.insert('primary-banner', (elem, meta) => {
@@ -197,7 +197,7 @@ This element is the media gallery container on vehicle details pages. Injecting
197
197
});
198
198
}
199
199
});
200
-
})(window.DDC.API);
200
+
})(window.DDC.APILoader);
201
201
```
202
202
203
203
This element is positioned in a prominent location above the vehicle listings on the Search Results Page.
@@ -211,20 +211,20 @@ You can target either the listings or details page by first subscribing to the <
211
211
> Usage:
212
212
213
213
```javascript
214
-
(WIAPI=> {
215
-
constAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
214
+
(asyncAPILoader=> {
215
+
constAPI=awaitAPILoader.create();
216
216
API.insert('secondary-content', (elem, meta) => {
217
217
// This element is the a secondary content container on vehicle details pages roughly 2/3 of the way down.
218
218
// It may also be added custom to one or more standalone pages on the website.
219
219
});
220
-
})(window.DDC.API);
220
+
})(window.DDC.APILoader);
221
221
```
222
222
223
223
> Example Implementation:
224
224
225
225
```javascript
226
-
(WIAPI=> {
227
-
constAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
226
+
(asyncAPILoader=> {
227
+
constAPI=awaitAPILoader.create();
228
228
API.subscribe('page-load-v1', ev=> {
229
229
if (ev.payload.detailPage) {
230
230
API.insert('secondary-content', (elem, meta) => {
@@ -235,7 +235,7 @@ You can target either the listings or details page by first subscribing to the <
235
235
});
236
236
}
237
237
});
238
-
})(window.DDC.API);
238
+
})(window.DDC.APILoader);
239
239
```
240
240
241
241
By default, this element is roughly 2/3 of the way down on vehicle details pages.
@@ -247,20 +247,20 @@ Since this may also be present on one or two standalone pages as custom addition
247
247
> Usage:
248
248
249
249
```javascript
250
-
(WIAPI=> {
251
-
constAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
250
+
(asyncAPILoader=> {
251
+
constAPI=awaitAPILoader.create();
252
252
API.insert('content', (elem, meta) => {
253
253
// This element is will only insert on pages created by us for your purposes.
254
254
// It may also be present on pages created for another integration.
255
255
});
256
-
})(window.DDC.API);
256
+
})(window.DDC.APILoader);
257
257
```
258
258
259
259
> Example Implementation:
260
260
261
261
```javascript
262
-
(WIAPI=> {
263
-
constAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
262
+
(asyncAPILoader=> {
263
+
constAPI=awaitAPILoader.create();
264
264
API.subscribe('page-load-v1', ev=> {
265
265
if (ev.payload.pageName==='YOUR_LANDING_PAGE') { // Note: Replace 'pageName' with the one we provide at page creation.
266
266
API.insert('content', (elem, meta) => {
@@ -272,7 +272,7 @@ Since this may also be present on one or two standalone pages as custom addition
272
272
});
273
273
}
274
274
});
275
-
})(window.DDC.API);
275
+
})(window.DDC.APILoader);
276
276
```
277
277
278
278
This element will represent the entirety of the empty space between the header and footer on a custom landing page.
0 commit comments