Skip to content

Commit 12f5e94

Browse files
author
vikasrohit
authored
Merge pull request #17 from appirio-tech/feature/adding-google-analytics-fields
adding google analytics fields
2 parents 0cd0a2c + c11a53d commit 12f5e94

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test:
1515

1616
deployment:
1717
development:
18-
branch: ["dev", "circleci", "test"]
18+
branch: ["dev", "test"]
1919
commands:
2020
- ./deploy/eb-deploy.sh tc-connect2sf DEV $CIRCLE_BUILD_NUM
2121
production:

consumer/src/services/ConsumerService.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ class ConsumerService {
9595
TC_Connect_Project_Status__c: _.get(project,"status",""),
9696
Ref_Code__c: _.get(project, "details.utm.code",""),
9797
TC_Connect_Direct_Project_Id__c: _.get(project, "directProjectId",""),
98-
TC_Connect_Cancel_Reason__c: _.get(project,"cancelReason","")
98+
TC_Connect_Cancel_Reason__c: _.get(project,"cancelReason",""),
99+
Google_Analytics_Click_ID__c: _.get(project,"details.utm.google._gclid",""),
100+
Google_Analytics_Client_ID__c: _.get(project,"details.utm.google._gacid","")
99101
};
100102
return SalesforceService.createObject('Lead', lead, accessToken, instanceUrl)
101103
.then((leadId) => {

consumer/test/ConsumerService.spec.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ describe('ConsumerService', () => {
2929
id: 1,
3030
details: {
3131
utm: {
32-
code: "123"
32+
code: "123",
33+
google: {
34+
_gacid: "1234.5678",
35+
_gclid: "5678.1234"
36+
}
3337
}
3438
},
3539
cancelReason: null,
@@ -85,7 +89,9 @@ describe('ConsumerService', () => {
8589
TC_Connect_Project_Status__c: '',
8690
TC_Connect_Cancel_Reason__c: null,
8791
TC_Connect_Direct_Project_Id__c: '',
88-
TC_Connect_Description__c:''
92+
TC_Connect_Description__c:'',
93+
Google_Analytics_Click_ID__c:'5678.1234',
94+
Google_Analytics_Client_ID__c:'1234.5678'
8995
};
9096

9197
const expectedCampaignMember = {

0 commit comments

Comments
 (0)