Re: Some questios about digitalData

Comments below ...



Filip von Reiche
VP Consulting - Technical

On the road, sent from iPad
(watch out for wild autocorrects)

| mobile: +1 917 930-4759  |


On Sep 18, 2015, at 10:16, Juan Carlos Palacios Chavez <jcpalaci@mx1.ibm.com<mailto:jcpalaci@mx1.ibm.com>> wrote:

Hi there

I am trying to understand the way a user can build the digitalData object, since we have to parse the documents in order to find the information stored there.

In general, I understand the specification, but I have a few questions I would like you to help me understand:


  *   In the specification, a few examples are used, and they give me the impression we can use multiple expressions to build the digitalObject across the document.. Instead of having the digitalObject definition in one single expression (using one single object literal), can we use different expressions (like my example below) to define digitalData? I think refer to all the standards governing how to work with and build up JSON. In short though you are right - there are multiple ways to build this, either as a single object, or in smaller pieces as the information becomes available
  *   Are we supposed to define digitalObject in the head? Can be spread across the document (body)? - it depends on how your site backend is constructed, but in many cases building it in the head might not be possible or practical
  *   Can we use variables to build values? Like "productURL": basePath + 'path' - yes and no - it depends on your use case which does come back to how well you understand how to work with JSON


digitalData = {
        page: {
                category: {
                        primaryCategory: 'SB03'
                },
                pageInfo: {
                        effectiveDate: '2015-05-14',
                        expiryDate: '2017-12-18',
                        language: 'en-US',
                        ibm: {
                                ...
                        },
                }
        }
};

...

digitalData.page.pageInfo.maxymiser: {
        "synchronous": true
};

...
var basePath = 'http://www.server.com/';

digitalData.product = [];
digitalData.product[0] = {
        productID: "testID",
        'productName': "testName",
        "productURL": basePath + 'path'
};



Thanks in advance

Best regards
JC

Juan Carlos Palacios
UX Developer  - IBM Client Innovation Center
Phone: +52-33-3669-7000 x4321
Mobile: 52-33-1150-6292
E-mail: jcpalaci@mx1.ibm.com<mailto:jcpalaci@mx1.ibm.com>

acceleration
FILIP VON REICHE
VP CONSULTING – TECHNOLOGY

C +1 917 930 4759
T +1 212 784 5466
O +1 914 595 6023



www.acceleration.biz<http://www.acceleration.biz>

Received on Friday, 18 September 2015 12:44:12 UTC