Skip to content

Implement support for multi-site data#33

Open
lexisother wants to merge 1 commit into
verbb:craft-5from
brikdigital:feature/multisite
Open

Implement support for multi-site data#33
lexisother wants to merge 1 commit into
verbb:craft-5from
brikdigital:feature/multisite

Conversation

@lexisother
Copy link
Copy Markdown

This PR implements very basic support for configuring a View to support retrieving data from multiple sites.

Currently this only supports environments where the root URL of all Craft sites is the same. (think of $PRIMARY_SITE_URL/site1, $PRIMARY_SITE_URL/site2, etc)
This because a Source can only be configured with one property/app, which are (typically) only for one single domain.

However, support for differing root domains can be added by adjusting the payload I added (and making whatever other necessary changes within Metrix):

"dimensionFilter": {
  "filter": {
    "fieldName": "pageLocation",
    "stringFilter": {
      "matchType": "BEGINS_WITH",
      "value": "https://example.com/"
    }
  }
}

There's no need to merge this PR as-is, or at all, at the very least this is a reference implementation for something that could be. For now, I will likely be running a fork of Metrix for a client that requested this functionality.

@bramnijssen
Copy link
Copy Markdown

Addresses #2

@engram-design
Copy link
Copy Markdown
Member

Thanks for this, appreciate it! I'll give it a look over to see if practical to merge, or if we want to tweak further for release.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants