Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

eDesign N630

Setup:

1. Navigate to the base folder of eDesign N630.


2. Change the MySQL connection string in the python file. (line 26)
a. "mysql+mysqlconnector://username:password@localhost/databasename"
E.g., "mysql+mysqlconnector://root:Dl251168dl.@localhost/n630_analysis"

b. If you want to change the view id of change in the variable. (line 19)
N630_VIEW_ID = '213348516'

PROD 213348516
PPR 213374712
SQE 209614453
DEV 209530435

c. Check whether you have imported the SQL Backup of N630, which can be found in
https://schneider-electric.app.box.com/folder/163402482246

d. Configs files for GA Events can be found in folder ga_configs.

Run Command:

python processN630GA.py -s 2022-05-01 -e 2022-05-31 -m ALL

-s Argument = Start Date

-e Argument = End Date

-m Mode = ALL

Note: You Need to Run for an Entire Month. And the process cannot be clubbed for more than one
month. For e.g., 2022-05-01 to 2022-06-30 this is not correct as our code is designed to process only
for one month at a time

Testcases:

Detailed testcases can be found inside the folder Testcase

Internal
N630 Events:

1. BOM Value

eventLabel and eventValue are the important dimensions for calculation. Eventlabel
contains project id and event value contains BOM Value.

a. Data is sorted according to Time.


b. Then for each projectId last calculated BOM Value is taken.
c. Afterwards BOM Value is summed for all project Id.
d. Sample Input and Output can be found in Testcases file

2. BOM Exports

Unique events for BOM are taken for calculation.

eventLabel = projectId; type_of_export

eventLabel contains projectId with type of Export.

Note: If the users have exported same project with same exports type multiple times, only
single count is considered

3. Project Created

Unique project Id’s are counted for the particular period and taken for calculation.

Note: We are also considering Duplicated projects into account. If a project have been
duplicated it was also counted

4. Switchboard Created

Unique switchboard Id’s are counted for the particular period and taken for calculation.

Note: We are also considering Duplicated Switchboard into account. If a switchboard have
been duplicated it was also counted

5. Sessions

avgSessionDuration – Google API which gives session duration in Seconds

<3 Min <180 Seconds


3 – 15 Min Between 180 and 900

Internal
15 – 30 Min Between 900 and 1800
30 Min Greater than 1800
6. Traffic Sources
"dimensions" : [

{"name": "ga:channelGrouping"}, -> Gives whether the mode is Direct, Organic or Referral

{"name": "ga:year"}

{"name": "ga:sourceMedium"} -> Gives the Source URL and medium

],

"metrics" : [

{"expression": "ga:users"},

{"expression": "ga:newUsers"},

{"expression": "ga:sessions"},

{"expression": "ga:bounceRate"},

{"expression": "ga:avgSessionDuration"},

{"expression": "ga:pageviewsPerSession"}

Traffic Sources calculation is pretty much straight forward. The above Json was a configuration
file for sources with relevant metrics.

7. Users

Active Users:
ClientID was automatically assigned to users by google via cookies. Unique ClientID for each
month was calculated for active users.

Active users – Calculated manually as if we add multiple dimensions in ga query value gets
reduced drastically. So, we are manually calculating the active users using client id.

New Users:
Ga:newUsers parameter was considered for counting new users.

Internal

You might also like