1

As per the "SDL Web Experience Optimization8" guide I have created Custom Dimensions in google analytics->Property menu->custom definition

Experiment ID
Instance ID
Publication ID
Page ID
Region ID
Component ID
Component Template ID
Chosen Variant

And the same custom dimensions are added in the smart_target_conf.xml file:

<Analytics implementationClass="com.tridion.smarttarget.analytics.google.GoogleAnalyticsManager" timeoutMilliseconds="5000" trackingRedirectUrl="/redirect/">
    <ServiceAccountEmailAddress>xxxxxx</ServiceAccountEmailAddress>
    <PrivatekeyPath>xxxxxxx</PrivatekeyPath>
    <AccountId>xxxx</AccountId>
    <TrackingId>xxxxx</TrackingId>
    <ViewId>xxxxxx</ViewId>
    <CustomDimensions>
        <ExperimentId>Experiment ID</ExperimentId>
        <InstanceId>Instance ID</InstanceId>
        <PublicationId>Publication ID</PublicationId>
        <PageId>Page ID</PageId>
        <Region>Region ID</Region>
        <ComponentId>Component ID</ComponentId>
        <ComponentTemplateId>ComponentTemplate ID</ComponentTemplateId>
        <ChosenVariant>Chosen Variant</ChosenVariant>
    </CustomDimensions>
</Analytics>

But when I click on my Experiment in CME to see the statics it throws below Error:

2017-01-18 00:34:17,853 INFO  ExperimentResolver - Getting Statistics per day for Experiment: 4b3fccd1-c107-4180-ac12-9e6757434263, Publication: tcm:0-15-1 between 2017-01-17T00:00:00 and 2017-01-18T00:00:00
2017-01-18 00:34:17,853 INFO  Experiment - Loading statistics per day for Experiment: '4b3fccd1-c107-4180-ac12-9e6757434263' and Publication: 'tcm:0-15-1', between 'Tue Jan 17 00:00:00 PST 2017' and 'Wed Jan 18 00:00:00 PST 2017'.
2017-01-18 00:34:17,884 DEBUG AnalyticsManager - Instantiating analytics manager for configured class name: com.tridion.smarttarget.analytics.google.GoogleAnalyticsManager
2017-01-18 00:34:17,915 DEBUG GoogleAnalyticsManager - Getting statistics from Google Analytics (viewId: ga:138340924, Start: 2017-01-17, End: 2017-01-18) for dimensions: 'ga:Chosen Variant,ga:date,ga:eventAction', filtering on: 'ga:Experiment ID==4b3fccd1-c107-4180-ac12-9e6757434263;ga:Instance ID==CdEnvironment2;ga:Publication ID==tcm:0-15-1'.
2017-01-18 00:34:18,290 ERROR ExperimentResolver - Unable to get a list of Experiments.
com.tridion.smarttarget.SmartTargetException: java.util.concurrent.ExecutionException: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
  "code" : 400,
  "errors" : [ {
    "domain" : "global",
    "message" : "Invalid value 'ga:Experiment ID==4b3fccd1-c107-4180-ac12-9e6757434263;ga:Instance ID==CdEnvironment2' for filters parameter.",
    "reason" : "invalidParameter"
  } ],
  "message" : "Invalid value 'ga:Experiment ID==4b3fccd1-c107-4180-ac12-9e6757434263;ga:Instance ID==CdEnvironment2' for filters parameter."
}
    at com.tridion.smarttarget.analytics.AnalyticsManager.getStatistics(AnalyticsManager.java:215) ~[smarttarget_core-8.1.1.jar:8.1.1]
    at com.tridion.smarttarget.analytics.AnalyticsManager.getStatistics(AnalyticsManager.java:189) ~[smarttarget_core-8.1.1.jar:8.1.1]
    at com.tridion.smarttarget.experiments.Experiment.loadStatistics(Experiment.java:198) ~[smarttarget_core-8.1.1.jar:8.1.1]
    at com.sdl.web.experience.management.experiments.ExperimentResolver.getExperimentsWithStatistics(ExperimentResolver.java:159) ~[xo-management-extension-8.1.1.jar:8.1.1]
    at com.sdl.web.experience.management.experiments.ExperimentResolver.resolveCollection(ExperimentResolver.java:61) ~[xo-management-extension-8.1.1.jar:8.1.1]
    at com.sdl.web.content.odata.input.resolver.ResolverBase.resolve(ResolverBase.java:73) [content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
    at com.sdl.web.content.odata.input.handler.ODataFeedRenderer.renderODataFeed(ODataFeedRenderer.java:57) [content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
    at com.sdl.web.content.odata.input.handler.ODataWebHandler.handleODataEntity(ODataWebHandler.java:201) [content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
    at com.sdl.web.content.odata.input.handler.ODataWebHandler.handleResourceRequest(ODataWebHandler.java:175) [content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
    at com.sdl.web.content.controller.ContentV2Controller.handleResourceRequest(ContentV2Controller.java:91) [content-v2-controller-8.1.1-1008.jar:8.1.1-1008]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_112]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_112]

On my webpage Experiments are getting displayed without any issue. I checked similar issue reported here Error "Invalid value for Filter Parameteres" in Smart Target Experiments but its not in sync to this issue.

1

I think your custom dimensions are not configured properly. This is what we use in our DXA Test Environment:

        <CustomDimensions>
            <ExperimentId>dimension1</ExperimentId>
            <InstanceId>dimension2</InstanceId>
            <PublicationId>dimension3</PublicationId>
            <PageId>dimension4</PageId>
            <Region>dimension5</Region>
            <ComponentId>dimension6</ComponentId>
            <ComponentTemplateId>dimension7</ComponentTemplateId>
            <ChosenVariant>dimension8</ChosenVariant>
        </CustomDimensions>
  • Hi Rick; "dimension1", "dimension2" are default values present in smarttarget_conf.xml and I was thinking these are dummy values and should be replaced with actual custom dimensions we created in GA Admin Property menu->custom definition->custome dimension. Let me know if its not true; I wonder how XO will then be able to map the custom dimensions we created in GA – Gulshan Thakur Jan 19 '17 at 7:26
  • They aren't dummy values. They are the IDs of the dimensions, which are separate from the label that is presented in the GA UI. In general, it will be the order in which you create them -- so if you start by adding Experiment ID, that will be dimension1, then add InstanceId, PublicationId, etc. in the order -- then you can use these defaults. If you've already created some dimensions you will need to adjust the numbers. You should be able to see the ID of the dimensions in the Google Analytics interface, but I'm not sure where as I don't currently have access to an account to check. – Peter Kjaer Apr 20 '17 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.