Skip to content

Not prefetching views #25

Description

@tinavanschelt

Hi,

We’re using the next-server-side-rendering-demo for a pretty large project and this is the first server-side integration within the company. If we use the targetClient.getOffers() call as it is in the demo, the request is not prefetching any views - this is the response we receive:

AT: Response received {
  "status": 200,
  "requestId": "xxx",
  "id": {
    "tntId": "xxx"
  },
  "client": "xxx",
  "edgeHost": "mboxedge35.tt.omtrdc.net",
  "prefetch": {} // empty
}

If we replace the prefetchViewsRequest variable with an older mbox call



execute: {
  mboxes: [{
      address: {
        url: requestURL,
      },
      name: mboxName,
    },
  ],
}

the request does return the experiments for that mbox. We've checked the config numerous times and are calling the right properties, etc. We do have A/B tests configured based on URL location, but I suspect this might have to do with how we configure our A/B tests in the AT dashboard, is there anything specific that we need to do to get the experiments to show up when we prefetch views?

Then, what would the best approach be for handling action execution once the views have been fetched? Ideally, we would like to avoid having to hardcode anything into our codebase and handle everything within the dashboard. So if, for example, we wanted to change a button color, we don’t want to have to update the code to handle a flag of sorts, we want that action to fire automatically - is that possible?

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions