Skip to content

Commit

Permalink
Update 02. DataStudio Integration for Visualizations & Reports.md
Browse files Browse the repository at this point in the history
removed older versions of V5 dashboard
  • Loading branch information
SangeetaMishr authored Sep 12, 2024
1 parent 6fae624 commit e11585b
Showing 1 changed file with 0 additions and 116 deletions.
Original file line number Diff line number Diff line change
@@ -1,121 +1,5 @@
> ### **3 minute read                                                                                                                 `Intermediate`**
## Steps to integrate DataStudio for newly onboarded organization

1 . Copy the Glific Report template.

2 . Add data sources.

3 . Connect all tables one by one to get the data from BigQuery tables.

4 . Get data in Flat Fields (Refer : [Populate data in Field Views (User info) report.](https://glific.github.io/docs/docs/Product%20Features/Reporting%20&%20Dashboard/Populate%20Data%20in%20Field%20Views-%20User%20Info%20Report/)

5 . Your reports will be ready.

**Below are the detailed steps with screenshots to integrate Data studio.**

**_Note:_** _The screenshots may be different, as google may update the screens with their updates_

1 . Click on the link of the reports template (shared publicly with view access). Use the latest **version 4.0** for your reports.

- Template v2.3: [https://datastudio.google.com/s/hUkQeA0pjH4](https://datastudio.google.com/s/hUkQeA0pjH4)
- Template v3.0: [https://datastudio.google.com/reporting/676f97b8-9da0-41a6-a50a-6c05190eac2c](https://datastudio.google.com/reporting/676f97b8-9da0-41a6-a50a-6c05190eac2c)
- Template v4.0: [https://datastudio.google.com/u/0/reporting/fdc97942-72e5-4d7d-92c4-4a4c7da9be86/page/p_t8287rtztc](https://datastudio.google.com/u/0/reporting/fdc97942-72e5-4d7d-92c4-4a4c7da9be86/page/p_t8287rtztc)

1.

2 . Click on the `Make a copy` icon at the top right corner, from the 3 dots dropdown next to the Share button.

![image](https://user-images.githubusercontent.com/32592458/212663584-0780edee-bff6-4714-b088-a8f4a60e5b63.png)

3 . Click on `Copy Report`.

**_Note_**_: Use the original data source, for now, don’t change it for any data source, it will break a few charts which have calculated or renamed fields._

![image](https://user-images.githubusercontent.com/32592458/212663623-13a99b24-1848-4c2e-af9f-22986e1b2435.png)

4. In the new tab of the created copy of the report, select `Manage added data sources`from the Resources Menu

![image](https://user-images.githubusercontent.com/32592458/212663662-6e5145a3-44ad-4228-b342-35c9336c8029.png)

5. Click on `edit` one by one for each tables. Start with **contact** and **messages** tables

![image](https://user-images.githubusercontent.com/32592458/212663748-52bb6637-8dc2-4186-8847-1bdcdd87cb67.png)

6. Select BigQuery data source

a. Select `MY PROJECTS`

b. Select the `Project` (_If the project is not listed you might need to enter the_ **_project ID_** _manually_)

c. Select the `Dataset`

d. Select the `Table`. Click on the `Reconnect` button.

![image](https://user-images.githubusercontent.com/32592458/212663799-cd8bb1bd-975c-4002-af79-f1840d55a7cd.png)

f . You might get a warning "`Configuration has changed. Do you want to apply the changes?`”. That’s ok, click on `APPLY`

![image](https://user-images.githubusercontent.com/32592458/212663828-8000aace-580e-4c42-9248-d3a1c4baab5a.png)

g . Click on `DONE` in fields listing page

![image](https://user-images.githubusercontent.com/32592458/212663847-338d5a56-2374-46b6-860f-b7bac3f6a3b3.png)

**_Repeat steps 5 and 6 for the following tables. Contacts, Messages_**

To get the project ID click on the phone number on BigQuery.

![image](https://user-images.githubusercontent.com/32592458/212663868-0de922cd-7b17-47fc-ad1a-d4c00bc128b8.png)

6 . For Flat fields data source update the custom query with **project ID** (from

the Glific settings interface for big query) and phone number

![image](https://user-images.githubusercontent.com/32592458/212663893-3fd0358b-066f-4bcf-a3ea-34647d1aa725.png)

and click on `Reconnect`to update.

![image](https://user-images.githubusercontent.com/32592458/212663917-aa382287-5c61-4826-8fb8-df22c764480c.png)

7. For Flow context data source update the custom query with **project ID** (from

the Glific settings interface for big query) and phone number. There will be four place where you need to update the **project ID**

![image](https://user-images.githubusercontent.com/32592458/212663940-cb623c04-38a4-47ce-9a9c-37803e252315.png)

8. Follow the same steps as above for `Monthly active users` the data source. Replace the **project ID** and **phone number** as per your setup.

9 . For Flow results. Go to your big Query account. Open a new Tab and run below query. Replace `tides-saas-309509.917302307943` with your **Project ID**

![image](https://user-images.githubusercontent.com/32592458/212663971-569e3848-7a8a-44ff-813a-f044962c3397.png)

```
CREATE OR REPLACE FUNCTION `tides-saas-309509.917302307943.jsonObjectKeys`(input STRING) RETURNS ARRAY<STRING> LANGUAGE js AS R"""
const inputJson=JSON.parse(input)
return Object.keys(inputJson).map((key) => {
return (JSON.stringify([key, inputJson[key].input]));
});
""";
```

10 . Click on `Run` button. After successful execution a new Routine will be created with name `JsonObjectKeys`

![image](https://user-images.githubusercontent.com/32592458/212664014-f6f114ce-6677-4b86-a360-bf801280985d.png)

11 . Go back to DataStudio and follow the same steps as we did for Flat fields (7 &amp; 8) above for `Flow Results` data source. Replace the **project ID** and **phone number** as per your setup.

12 . Click `CLOSE` on the top right, and your reports will be ready

![image](https://user-images.githubusercontent.com/32592458/212664047-85461e8b-65ca-4790-87cc-47724f9506fe.png)

13 . Your reports are ready for use.

![image](https://user-images.githubusercontent.com/32592458/212664089-c796e0c7-24d1-4599-a476-e3a11767bfd3.png)

14. Follow the steps in the below document to create reports.

[https://support.google.com/datastudio/answer/6292570?hl=en](https://support.google.com/datastudio/answer/6292570?hl=en)

## Connection to V5 Data Studio Report

Expand Down

0 comments on commit e11585b

Please sign in to comment.