@@ -12,20 +12,20 @@ There are currently three types of events and each has a consistent data format.
1212
1313``` javascript
1414{
15- accountId: ' futuredemodealer' ,
16- siteId: ' futuredemodealer' ,
17- defaultDomain: ' www.roimotors.com' ,
18- indexPage: true ,
19- searchPage: false ,
20- detailPage: false ,
21- franchises: [' honda' ],
22- design: {
23- variationId: ' v9_GLOBAL_0011_V2' ,
24- themekit: ' BLUE_WHITE'
25- },
26- pageName: ' INDEX' ,
27- layoutType: ' desktop' ,
28- locale: ' en_US'
15+ accountId: ' futuredemodealer' ,
16+ siteId: ' futuredemodealer' ,
17+ defaultDomain: ' www.roimotors.com' ,
18+ indexPage: true ,
19+ searchPage: false ,
20+ detailPage: false ,
21+ franchises: [' honda' ],
22+ design: {
23+ variationId: ' v9_GLOBAL_0011_V2' ,
24+ themekit: ' BLUE_WHITE'
25+ },
26+ pageName: ' INDEX' ,
27+ layoutType: ' desktop' ,
28+ locale: ' en_US'
2929}
3030```
3131
@@ -49,21 +49,21 @@ Field Key | Example Value | Field Format
4949
5050``` javascript
5151{
52- dealershipName: ' ROI Motors' ,
53- dealershipAddress1: ' 1 Howard Street' ,
54- dealershipAddress2: ' ' ,
55- dealershipCity: ' Burlington' ,
56- dealershipCodes: {
57- ' dealertrack-post' : ' futuredemodealer' ,
58- dtid: ' 12345' ,
59- ' dt-dr-profile' : ' futuredemodealer' ,
60- affiliate_promotions: ' avis' ,
61- ' at-kbb' : ' 12345678'
62- },
63- dealershipFranchises: [' honda' ],
64- dealershipPostalCode: ' 05401' ,
65- dealershipStateProvince: ' VT' ,
66- dealershipCountry: ' US'
52+ dealershipName: ' ROI Motors' ,
53+ dealershipAddress1: ' 1 Howard Street' ,
54+ dealershipAddress2: ' ' ,
55+ dealershipCity: ' Burlington' ,
56+ dealershipCodes: {
57+ ' dealertrack-post' : ' futuredemodealer' ,
58+ dtid: ' 12345' ,
59+ ' dt-dr-profile' : ' futuredemodealer' ,
60+ affiliate_promotions: ' avis' ,
61+ ' at-kbb' : ' 12345678'
62+ },
63+ dealershipFranchises: [' honda' ],
64+ dealershipPostalCode: ' 05401' ,
65+ dealershipStateProvince: ' VT' ,
66+ dealershipCountry: ' US'
6767}
6868```
6969
@@ -85,60 +85,60 @@ Field Key | Example Value | Field Format
8585
8686``` javascript
8787{
88- accountId: ' futuredemodealer' ,
89- address: {
90- accountName: ' ROI Motors' ,
91- city: ' Burlington' ,
92- state: ' VT' ,
93- postalCode: ' 05401' ,
94- country: ' US'
95- },
96- autodataCaId: ' 1234567' ,
97- bodyStyle: ' SUV' ,
98- certified: false ,
99- chromeId: ' 411601' ,
100- cityFuelEconomy: 28 ,
101- classification: ' primary' ,
102- dealerCodes: {
103- ' dealertrack-post' : ' futuredemodealer' ,
104- dtid: ' 12345' ,
105- ' dt-dr-profile' : ' futuredemodealer' ,
106- affiliate_promotions: ' avis' ,
107- ' at-kbb' : ' 12345678'
108- },
109- driveLine: ' Front-wheel Drive' ,
110- engine: ' I-4 cyl' ,
111- engineSize: ' 1.5L' ,
112- exteriorColor: ' Crystal Black Pearl' ,
113- finalPrice: 32000 ,
114- fuelType: ' Regular Unleaded' ,
115- highestPrice: 34500 ,
116- highwayFuelEconomy: 34 ,
117- images: [
118- ' https://pictures.dealer.com/f/futuredemodealer/1182/0686eb936bd7a4905f751493cc28dcb9x.jpg'
119- ],
120- internetPrice: 33000 ,
121- interiorColor: ' White' ,
122- inventoryType: ' new' ,
123- link: ' https://www.roimotors.com/new/Honda/2020-Honda-Accord-burlington-ab119e0e0a0a00f944d6f3031cd34854.htm' ,
124- make: ' Honda' ,
125- model: ' CR-V' ,
126- modelCode: ' RW1H9LKNW' ,
127- msrp: 34000 ,
128- odometer: 3 ,
129- optionCodes: [
130- ' ABC' ,
131- ' 123' ,
132- ' 321'
133- ],
134- startingPrice: 34000 ,
135- status: ' live' ,
136- stockNumber: ' 00100060' ,
137- transmission: ' Variable' ,
138- trim: ' Touring 2WD' ,
139- uuid: ' ab119e0e0a0a00f944d6f3031cd34854' ,
140- vin: ' 1HGCV1F42JA141468' ,
141- year: 2020
88+ accountId: ' futuredemodealer' ,
89+ address: {
90+ accountName: ' ROI Motors' ,
91+ city: ' Burlington' ,
92+ state: ' VT' ,
93+ postalCode: ' 05401' ,
94+ country: ' US'
95+ },
96+ autodataCaId: ' 1234567' ,
97+ bodyStyle: ' SUV' ,
98+ certified: false ,
99+ chromeId: ' 411601' ,
100+ cityFuelEconomy: 28 ,
101+ classification: ' primary' ,
102+ dealerCodes: {
103+ ' dealertrack-post' : ' futuredemodealer' ,
104+ dtid: ' 12345' ,
105+ ' dt-dr-profile' : ' futuredemodealer' ,
106+ affiliate_promotions: ' avis' ,
107+ ' at-kbb' : ' 12345678'
108+ },
109+ driveLine: ' Front-wheel Drive' ,
110+ engine: ' I-4 cyl' ,
111+ engineSize: ' 1.5L' ,
112+ exteriorColor: ' Crystal Black Pearl' ,
113+ finalPrice: 32000 ,
114+ fuelType: ' Regular Unleaded' ,
115+ highestPrice: 34500 ,
116+ highwayFuelEconomy: 34 ,
117+ images: [
118+ ' https://pictures.dealer.com/f/futuredemodealer/1182/0686eb936bd7a4905f751493cc28dcb9x.jpg'
119+ ],
120+ internetPrice: 33000 ,
121+ interiorColor: ' White' ,
122+ inventoryType: ' new' ,
123+ link: ' https://www.roimotors.com/new/Honda/2020-Honda-Accord-burlington-ab119e0e0a0a00f944d6f3031cd34854.htm' ,
124+ make: ' Honda' ,
125+ model: ' CR-V' ,
126+ modelCode: ' RW1H9LKNW' ,
127+ msrp: 34000 ,
128+ odometer: 3 ,
129+ optionCodes: [
130+ ' ABC' ,
131+ ' 123' ,
132+ ' 321'
133+ ],
134+ startingPrice: 34000 ,
135+ status: ' live' ,
136+ stockNumber: ' 00100060' ,
137+ transmission: ' Variable' ,
138+ trim: ' Touring 2WD' ,
139+ uuid: ' ab119e0e0a0a00f944d6f3031cd34854' ,
140+ vin: ' 1HGCV1F42JA141468' ,
141+ year: 2020
142142}
143143```
144144
@@ -221,10 +221,10 @@ To receive data for events, you must opt-in to event subscriptions. Each event i
221221
222222``` javascript
223223(async APILoader => {
224- const API = await APILoader .create (document . currentScript );
225- API .subscribe (' page-load-v1' , ev => {
226- API .log (ev);
227- });
224+ const API = await APILoader .create ();
225+ API .subscribe (' page-load-v1' , ev => {
226+ API .log (ev);
227+ });
228228})(window .DDC .APILoader );
229229
230230```
@@ -244,10 +244,10 @@ The page load event is useful to determine the context of the current page. By m
244244
245245``` javascript
246246(async APILoader => {
247- const API = await APILoader .create (document . currentScript );
248- API .subscribe (' dealership-info-v1' , ev => {
249- API .log (ev);
250- });
247+ const API = await APILoader .create ();
248+ API .subscribe (' dealership-info-v1' , ev => {
249+ API .log (ev);
250+ });
251251})(window .DDC .APILoader );
252252
253253```
@@ -267,10 +267,10 @@ The dealership info event is useful if you need to know the name and address of
267267
268268``` javascript
269269(async APILoader => {
270- const API = await APILoader .create (document . currentScript );
271- API .subscribe (' vehicle-shown-v1' , ev => {
272- API .log (ev);
273- });
270+ const API = await APILoader .create ();
271+ API .subscribe (' vehicle-shown-v1' , ev => {
272+ API .log (ev);
273+ });
274274})(window .DDC .APILoader );
275275```
276276
@@ -291,11 +291,11 @@ On a vehicle deals page, a single event is fired because you are viewing a singl
291291
292292``` javascript
293293(async APILoader => {
294- const API = await APILoader .create (document . currentScript );
295- API .subscribe (' vehicle-data-updated-v1' , data => {
296- API .log (data .payload .pageData ); // Outputs the Page Data object to the console.
297- API .log (data .payload .vehicleData ); // Outputs the updated Vehicle Data object to the console.
298- });
294+ const API = await APILoader .create ();
295+ API .subscribe (' vehicle-data-updated-v1' , data => {
296+ API .log (data .payload .pageData ); // Outputs the Page Data object to the console.
297+ API .log (data .payload .vehicleData ); // Outputs the updated Vehicle Data object to the console.
298+ });
299299})(window .DDC .APILoader );
300300```
301301
0 commit comments