utm-marks
parent
6f09404ce4
commit
34b56c4dfc
|
|
@ -1,6 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormsService } from '../_services/forms.service';
|
||||
import {FormGroup, ReactiveFormsModule, FormBuilder, Validators} from "@angular/forms";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
|
||||
@Component({
|
||||
selector: 'request',
|
||||
|
|
@ -13,7 +14,20 @@ export class RequestComponent implements OnInit {
|
|||
public hidden = true;
|
||||
public feedbackForm: FormGroup;
|
||||
|
||||
constructor(private formBuilder:FormBuilder, private formsService: FormsService) {
|
||||
public utmSource:string;
|
||||
public utmMedium:string;
|
||||
public utmCampaign:string;
|
||||
public utmContent:string;
|
||||
public utmTerm:string;
|
||||
|
||||
constructor(private formBuilder:FormBuilder, private formsService: FormsService, private router: ActivatedRoute) {
|
||||
this.router.queryParams.subscribe(params =>{
|
||||
this.utmSource = params['utm_source'];
|
||||
this.utmMedium = params['utm_medium'];
|
||||
this.utmCampaign = params['utm_campaign'];
|
||||
this.utmContent = params['utm_content'];
|
||||
this.utmTerm = params['utm_term']
|
||||
})
|
||||
}
|
||||
|
||||
ngOnInit():void{
|
||||
|
|
@ -27,7 +41,12 @@ export class RequestComponent implements OnInit {
|
|||
'feedback-add-number':[''],
|
||||
'feedback-message':['',Validators.required],
|
||||
mailto:['test@nirgroup.ru'],
|
||||
type:['feedback-form-support']
|
||||
type:['feedback-form-support'],
|
||||
'utm-source':[this.utmSource],
|
||||
'utm-medium':[this.utmMedium],
|
||||
'utm-campaign':[this.utmCampaign],
|
||||
'utm-content':[this.utmContent],
|
||||
'utm-term':[this.utmTerm]
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
export const environment = {
|
||||
production: true,
|
||||
apiUrl: 'http://api.andrey-nirgroup.testnir.ru',
|
||||
apiUrl: 'https://api-andrey-nirgroup.testnir.ru',
|
||||
clientId: 2,
|
||||
clientSecret: 'DeZDnKSlldUPTjT0z9nq21C7zWnWwQ497HJ0eK3u',
|
||||
domenUrl: 'https://nirgroup.testnir.ru',
|
||||
domenUrl: 'https://andrey-nirgroup.testnir.ru',
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue