Skip to content

Commit

Permalink
Reserved Matomo for later to create release (#236)
Browse files Browse the repository at this point in the history
Co-authored-by: Hoang Vu Huy <[email protected]>
  • Loading branch information
vhhoang-axonivy and Hoang Vu Huy authored Nov 18, 2024
1 parent 2e72921 commit 378cde6
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 35 deletions.
16 changes: 8 additions & 8 deletions marketplace-ui/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { MARKED_OPTIONS, MarkdownModule } from 'ngx-markdown';
import { markedOptionsFactory } from './core/configs/markdown.config';
import { httpLoaderFactory } from './core/configs/translate.config';
import { apiInterceptor } from './core/interceptors/api.interceptor';
import { provideMatomo, withRouter } from 'ngx-matomo-client';
import { environment } from '../environments/environment';

const scrollConfig: InMemoryScrollingOptions = {
scrollPositionRestoration: 'disabled',
Expand All @@ -23,12 +21,14 @@ export const appConfig: ApplicationConfig = {
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes, inMemoryScrollingFeature),
provideHttpClient(withFetch(), withInterceptors([apiInterceptor])),
provideMatomo({
siteId: environment.matomoSiteId,
trackerUrl: environment.matomoTrackerUrl,
},
withRouter(),
),

// Disabled for later HTTPS implementation
// provideMatomo({
// siteId: environment.matomoSiteId,
// trackerUrl: environment.matomoTrackerUrl,
// },
// withRouter(),
// ),
importProvidersFrom(
TranslateModule.forRoot({
loader: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
id="install-button"
name="Install button"
#installButton
[matomoClickCategory]="MatomoCategory.BUTTON"
[matomoClickAction]="MatomoAction.CLICK"
[matomoClickName]="installButton.name + ' - ' + getTrackingEnvironmentBasedOnActionType()"
[lang]="languageService.selectedLanguage()"
class="btn btn__install flex-grow-1 me-lg-2"
data-bs-toggle="tooltip"
Expand All @@ -33,9 +30,6 @@
id="download-button"
name="Download button"
#artifactDownloadButton
[matomoClickCategory]="MatomoCategory.BUTTON"
[matomoClickAction]="MatomoAction.CLICK"
[matomoClickName]="artifactDownloadButton.name + ' - ' + getTrackingEnvironmentBasedOnActionType()"
[lang]="languageService.selectedLanguage()"
class="btn btn__download btn-secondary primary-bg flex-grow-1"
type="button"
Expand Down Expand Up @@ -122,9 +116,6 @@
<button id="install-button"
name="Install button"
#installButton
[matomoClickCategory]="MatomoCategory.BUTTON"
[matomoClickAction]="MatomoAction.CLICK"
[matomoClickName]="installButton.name + ' - ' + getTrackingEnvironmentBasedOnActionType()"
[lang]="languageService.selectedLanguage()"
class="btn btn__install flex-grow-1 install-designer-button m-0 col-4" id="install-button"
(click)="onUpdateInstallationCountForDesigner()" onClick="function installInDesigner() {
Expand All @@ -144,9 +135,6 @@
id="contact-us-button"
name="Contact us button"
#contactUsButton
[matomoClickCategory]="MatomoCategory.BUTTON"
[matomoClickAction]="MatomoAction.CLICK"
[matomoClickName]="contactUsButton.name + ' - ' + getTrackingEnvironmentBasedOnActionType()"
[lang]="languageService.selectedLanguage()"
class="btn row btn_contact-us"
(click)="onNavigateToContactPage()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { CookieService } from 'ngx-cookie-service';
import { CommonUtils } from '../../../../shared/utils/common.utils';
import { ActivatedRoute, Router } from '@angular/router';
import { ROUTER } from '../../../../shared/constants/router.constant';
import { MatomoTrackClickDirective } from 'ngx-matomo-client';
import { MatomoCategory, MatomoAction } from '../../../../shared/enums/matomo-tracking.enum';
import { MATOMO_TRACKING_ENVIRONMENT } from '../../../../shared/constants/matomo.constant';

Expand All @@ -47,7 +46,6 @@ const showDevVersionCookieName = 'showDevVersions';
FormsModule,
CommonDropdownComponent,
LoadingSpinnerComponent,
MatomoTrackClickDirective
],
templateUrl: './product-detail-version-action.component.html',
styleUrl: './product-detail-version-action.component.scss'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ <h4 [lang]="languageService.selectedLanguage()" class="sort-container__label tex
<input #productFilter autocomplete="on" [(ngModel)]="searchText" (ngModelChange)="onSearchChanged($event)" type="text"
[lang]="languageService.selectedLanguage()" class="form-control input__search bg-secondary border-0 rounded-start-0 ps-0 search-input"
[placeholder]="translateService.get('common.search.placeholder') | async"
[ariaLabel]="translateService.get('common.search.placeholder') | async" aria-describedby="search"
[matomoTracker]="MatomoTracker.CHANGE"
[matomoCategory]="MatomoCategory.INPUT"
[matomoAction]="MatomoAction.PRODUCT_SEARCH"
[matomoName]="productFilter.value"
[ariaLabel]="translateService.get('common.search.placeholder') | async" aria-describedby="search"
/>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ import { LanguageService } from '../../../core/services/language/language.servic
import { CommonDropdownComponent } from '../../../shared/components/common-dropdown/common-dropdown.component';
import { CommonUtils } from '../../../shared/utils/common.utils';
import { ItemDropdown } from '../../../shared/models/item-dropdown.model';
import { MatomoTrackerDirective } from 'ngx-matomo-client';
import { MatomoAction, MatomoCategory, MatomoTracker } from '../../../shared/enums/matomo-tracking.enum';

@Component({
selector: 'app-product-filter',
standalone: true,
imports: [CommonModule, FormsModule, TranslateModule, CommonDropdownComponent, MatomoTrackerDirective],
imports: [CommonModule, FormsModule, TranslateModule, CommonDropdownComponent],
templateUrl: './product-filter.component.html',
styleUrl: './product-filter.component.scss'
})
Expand Down
5 changes: 3 additions & 2 deletions marketplace-ui/src/environments/environment.development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const environment = {
githubClientId: 'Iv23livu9HbsC4Q24eSC',
githubAuthCallbackPath: '/auth/github/callback',
dayInMiliseconds: 86400000,
matomoSiteId: 1,
matomoTrackerUrl: '//marketplace.server.ivy-cloud.com:8085'
// Disabled for later HTTPS implementation
// matomoSiteId: 1,
// matomoTrackerUrl: '//marketplace.server.ivy-cloud.com:8085'
};
5 changes: 3 additions & 2 deletions marketplace-ui/src/environments/environment.staging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const environment = {
githubClientId: 'Iv23livu9HbsC4Q24eSC',
githubAuthCallbackPath: '/auth/github/callback',
dayInMiliseconds: 86400000,
matomoSiteId: 1,
matomoTrackerUrl: '//marketplace.server.ivy-cloud.com:8085'
// Disabled for later HTTPS implementation
// matomoSiteId: 1,
// matomoTrackerUrl: '//marketplace.server.ivy-cloud.com:8085'
};
5 changes: 3 additions & 2 deletions marketplace-ui/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const environment = {
githubClientId: 'Ov23liK1GCV3aAmN8kby',
githubAuthCallbackPath: '/auth/github/callback',
dayInMiliseconds: 86400000,
matomoSiteId: 1,
matomoTrackerUrl: '//marketplace.server.ivy-cloud.com:8085'
// Disabled for later HTTPS implementation
// matomoSiteId: 1,
// matomoTrackerUrl: '//marketplace.server.ivy-cloud.com:8085'
};

0 comments on commit 378cde6

Please sign in to comment.