Skip to content

Commit

Permalink
Version 1.16.1
Browse files Browse the repository at this point in the history
# Version 1.16.1

### Features
Assets hosted in the EU will now properly send analytics events to the EU hosted analytics domain (#1827)
  • Loading branch information
cea2aj committed Jun 29, 2023
2 parents ad4a9ba + 9643b81 commit 21bf511
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
3 changes: 1 addition & 2 deletions conf/i18n/translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ msgstr[0] ""
msgstr[1] ""

#: src/ui/templates/results/resultsheader.hbs:19
#: src/ui/templates/results/verticalresultscount.hbs:3
msgid "[[start]] through [[end]] of [[resultsCount]]"
msgstr ""

Expand Down Expand Up @@ -360,7 +359,7 @@ msgctxt "Example: 1-10 of 50"
msgid "<span class=\"yxt-ResultsHeader-resultsCountStart\">[[start]]</span> <span class=\"yxt-ResultsHeader-resultsCountDash\">-</span> <span class=\"yxt-ResultsHeader-resultsCountEnd\">[[end]]</span> <span class=\"yxt-ResultsHeader-resultsCountOf\">of</span> <span class=\"yxt-ResultsHeader-resultsCountTotal\">[[resultsCount]]</span>"
msgstr ""

#: src/ui/templates/results/verticalresultscount.hbs:5
#: src/ui/templates/results/verticalresultscount.hbs:3
msgctxt "Example: 1-10 of 50"
msgid ""
"<span class=\"yxt-VerticalResultsCount-start\">[[start]]</span>\n"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/answers-search-ui",
"version": "1.16.0",
"version": "1.16.1",
"description": "Javascript Search Programming Interface",
"main": "dist/answers-umd.js",
"repository": {
Expand Down
10 changes: 9 additions & 1 deletion src/core/utils/urlutils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PRODUCTION, SANDBOX } from '../constants';
import { CloudRegion } from '@yext/search-core';
import { PRODUCTION, SANDBOX, CLOUD_REGION } from '../constants';
import SearchParams from '../../ui/dom/searchparams';
import StorageKeys from '../storage/storagekeys';
import ComponentTypes from '../../ui/components/componenttypes';
Expand All @@ -17,6 +18,9 @@ export function getLiveApiUrl (env = PRODUCTION) {
* @param {boolean} conversionTrackingEnabled If conversion tracking has been opted into.
*/
export function getAnalyticsUrl (env = PRODUCTION, conversionTrackingEnabled = false) {
if (isEu()) {
return 'https://www.eu.yextevents.com';
}
if (conversionTrackingEnabled) {
return env === SANDBOX
? 'https://sandbox-realtimeanalytics.yext.com'
Expand All @@ -27,6 +31,10 @@ export function getAnalyticsUrl (env = PRODUCTION, conversionTrackingEnabled = f
: 'https://answers.yext-pixel.com';
}

function isEu () {
return CLOUD_REGION.toLowerCase() === CloudRegion.EU.toString();
}

/**
* Returns the passed in url with the passed in params appended as query params
* Note: query parameters in the url are stripped, you should include those query parameters
Expand Down
5 changes: 1 addition & 4 deletions src/ui/templates/results/verticalresultscount.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{{#unless isHidden}}
<div class="yxt-VerticalResultsCount"
aria-label="{{translate phrase='[[start]] through [[end]] of [[resultsCount]]' start=pageStart end=pageEnd resultsCount=total }}">
<div aria-hidden="true">
<div class="yxt-VerticalResultsCount">
{{translate
phrase=
'<span class="yxt-VerticalResultsCount-start">[[start]]</span>
Expand All @@ -14,6 +12,5 @@
end=pageEnd
resultsCount=total
}}
</div>
</div>
{{/unless}}

0 comments on commit 21bf511

Please sign in to comment.