Skip to content

Added a config setting for "setDomains" (needed for cross-domain tracking) #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

MichaelRoosz
Copy link

This setting allows to configure the setDomains() call. Related: #160


$this->makeSetting('domains', '', FieldConfig::TYPE_STRING, function (FieldConfig $field) {
$field->title = 'Domains';
$field->description = 'Set array of hostnames or domains to be treated as local. For wildcard subdomains, you can use: ".example.com" or "*.example.com". You can also specify a path along a domain: "*.example.com/subsite1"';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the description maybe say something like comma separated list? Or how would one actually configure an array? (haven't looked what setDomains) supports

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked setDomains expects an array...
btw be good to have this setting 👍

I'm not sure if we have a problem or not... haven't tried to implement it and don't know if I remember details 100% correct whether there is a problem when someone wants to define a string to read it from a TagManager Variable or when someone wants to define an array of strings. Not sure if both is actually possible at the same time yet. Not sure you understand.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. The code is now using an array for setDomains().
I have also updated the description a bit, most of it comes from the setDomains() from https://developer.matomo.org/api-reference/tracking-javascript

@MichaelRoosz MichaelRoosz force-pushed the add_setdomains_config branch from 31b456e to 6d77a65 Compare August 20, 2019 23:04
@tsteur
Copy link
Member

tsteur commented Aug 26, 2019

Cheers 👍 works nicely

@tsteur tsteur merged commit d8b28c5 into matomo-org:master Aug 26, 2019
@tsteur tsteur added this to the Current sprint milestone Aug 26, 2019
@mattab mattab changed the title Added a config setting for "setDomains" Added a config setting for "setDomains" (needed for cross-domain tracking) Oct 25, 2019
@innocraft-automation innocraft-automation removed this from the Current sprint milestone Feb 16, 2023
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.

4 participants