Skip to content

Commit

Permalink
Simplify documentation to upload (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
smcjones authored Oct 11, 2024
1 parent e137d40 commit 166671f
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 487 deletions.
56 changes: 31 additions & 25 deletions docs/updating-launch-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,6 @@ Clasp is a developer tool. It is useful for local developing, and it's how our c

You do not need to be highly technical to use clasp, but access to a terminal is required. You can use anything with access to Linux or Unix, including Cloud Shell or Colab for all commands except `clasp login` which requires access to a browser on the same computer.

### How to get the Script ID for clasp

1. [Navigate to Apps Script from your spreadsheet](#how-to-navigate-to-apps-script-from-your-spreadsheet)

2. Within Apps Script, locate the script ID in the URL bar. It is all of the information between **projects/** and **/edit**

![URL bar ID location](resources/appsscript-id.png)

3. Click in the highlighted section twice and it should select the entire ID. If any of the ID is not highlighted, manually drag from just after **projects/** until just before **/edit**. Copy with Ctrl+C (Cmd+C on Mac).

4. You have your script ID in your clipboard. You can paste it wherever you need it to go with Ctrl+V (Cmd+V on Mac).

### How to get the Parent ID for clasp

1. In your spreadsheet, look at the URL bar. Manually select everything between **d/** and **/edit**.

![URL bar ID location](resources/sheet-id.png)

2. Copy with Ctrl+C (Cmd+C on Mac).

3. You have your parent ID in your clipboard. YOu can paste it wherever you need it to go with Ctrl+V (Cmd+V on Mac).

### Initializing Clasp

This is a one-time setup per project.
Expand All @@ -67,17 +45,45 @@ npx @google/clasp login

2. Navigate to the tool you want to use (e.g. [CM360](/cm360/)).
3. Use your copy of the template found in the README of the folder.
4. Run the following commands, replacing `[parentId]` with [your parent ID](#how-to-get-the-parent-id-for-clasp) and `[scriptId]` with [your script ID](#how-to-get-the-script-id-for-clasp):
4. Run the following commands, replacing `[scriptId]` with [your script ID](#how-to-get-the-script-id-for-clasp)

```
npx @google/clasp create --parentId [parentId]
npx @google/clasp settings scriptId [scriptId]
npx @google/clasp clone [scriptId]
```

### Updating Clasp
Once `clasp` is initialized, updating is simple.

1. Find the path of the launch monitor you want to use (i.e. any from the [main README](/README.md#launch-monitors)),
2. Navigate to that directory.
3. Run `yarn push`.

## More Guides

### How to navigate to Apps Script from your spreadsheet

In your spreadsheet, go to **Extensions > Apps Script**

![Apps Script menu](resources/appsscript-menu.png)

### How to get the Parent ID for clasp

1. In your spreadsheet, look at the URL bar. Manually select everything between **d/** and **/edit**.

![URL bar ID location](resources/sheet-id.png)

2. Copy with Ctrl+C (Cmd+C on Mac).

3. You have your parent ID in your clipboard. YOu can paste it wherever you need it to go with Ctrl+V (Cmd+V on Mac).

### How to get the Script ID for clasp

1. [Navigate to Apps Script from your spreadsheet](#how-to-navigate-to-apps-script-from-your-spreadsheet)

2. Within Apps Script, locate the script ID in the URL bar. It is all of the information between **projects/** and **/edit**

![URL bar ID location](resources/appsscript-id.png)

3. Click in the highlighted section twice and it should select the entire ID. If any of the ID is not highlighted, manually drag from just after **projects/** until just before **/edit**. Copy with Ctrl+C (Cmd+C on Mac).

4. You have your script ID in your clipboard. You can paste it wherever you need it to go with Ctrl+V (Cmd+V on Mac).
2 changes: 1 addition & 1 deletion ts/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ you test changes on.
## Client Installation
1. Copy the spreadsheet template provided by your Google Representative
2. Add the correct libraryID replacing the brackets in [appsscript.json](appsscript.json).
3. Run `clasp create --parentId=[parentId]` where [parentId] is the ID of the copied spreadsheet.
3. Run `clasp clone [scriptId]` where [scriptId] is the ID of the Apps Script (See [How to get the Script ID for Clasp](/docs/updating-launch-monitor.md#how-to-get-the-script-id-for-clasp)).
4. Run `yarn && yarn push` to get your code pushed to the sheet.
5. Follow the instructions on the Launch Monitor tool to complete installation by adding triggers and a Project Number.
6. Give people access to your script in read only and share the link with them (replacing **edit/** with **copy/** in the URL).
26 changes: 7 additions & 19 deletions ts/dv360/appsscript.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
{
"timeZone": "Etc/GMT",
"dependencies": {
"enabledAdvancedServices": [
{
"userSymbol": "Drive",
"version": "v2",
"serviceId": "drive"
}
]
"enabledAdvancedServices": [{
"userSymbol": "Drive",
"serviceId": "drive",
"version": "v2"
}]
},
"oauthScopes": [
"https://www.googleapis.com/auth/doubleclickbidmanager",
"https://www.googleapis.com/auth/display-video",
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/spreadsheets.currentonly",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/adwords",
"https://www.googleapis.com/auth/script.container.ui",
"https://www.googleapis.com/auth/script.send_mail"
],
"exceptionLogging": "STACKDRIVER",
"oauthScopes": ["https://www.googleapis.com/auth/doubleclickbidmanager", "https://www.googleapis.com/auth/display-video", "https://www.googleapis.com/auth/script.external_request", "https://www.googleapis.com/auth/spreadsheets.currentonly", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/adwords", "https://www.googleapis.com/auth/script.container.ui"],
"runtimeVersion": "V8"
}
}
Loading

0 comments on commit 166671f

Please sign in to comment.