Skip to content

Commit

Permalink
load sak settings from DNT domain if anonymous tracking enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mbi88 committed Sep 2, 2020
1 parent 39601b8 commit bd85bc5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Userreport-survey/userreport/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

buildConfigField "String", "AP_SETTINGS_BASE_URL", "\"https://sak.userreport.com/\""
buildConfigField "String", "AP_SETTINGS_BASE_URL_DO_NOT_TRACK", "\"https://sak.dnt-userreport.com/\""
buildConfigField "String", "AP_COLLECT_API_ENDPOINT", "\"https://api.userreport.com/collect/v1/\""
buildConfigField "String", "AP_VISIT_ANALYTICS_BASE_URL", "\"https://visitanalytics.userreport.com/hit.gif?\""
buildConfigField "String", "AP_VISIT_ANALYTICS_DO_NOT_TRACK_URL", "\"https://visitanalytics.dnt-userreport.com/hit.gif?\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ private void createSession() {
}

private void initSettingsLoader() {
String settingsUrl = anonymousTracking ? BuildConfig.AP_SETTINGS_BASE_URL_DO_NOT_TRACK
: BuildConfig.AP_SETTINGS_BASE_URL;

settingsLoader = new UserReportSettingsLoader(context,
BuildConfig.AP_SETTINGS_BASE_URL,
settingsUrl,
sakId,
mediaId,
logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<resources>
<string name="ap_settings_base_url">[[[ap_settings_base_url]]]</string>
<string name="ap_settings_base_url_do_not_track">[[[ap_settings_base_url_do_not_track]]]</string>
<string name="ap_collect_api_endpoint">[[[ap_collect_api_endpoint]]]</string>
<string name="ap_visit_analytics_base_url">[[[ap_visit_analytics_base_url]]]</string>
<string name="ap_visit_analytics_do_not_track_url">[[[ap_visit_analytics_do_not_track_url]]]</string>
Expand Down

0 comments on commit bd85bc5

Please sign in to comment.