# Using JavaScript to open "By View" tab in Recording Analytics

**URL:** <https://devforum.zoom.us/t/using-javascript-to-open-by-view-tab-in-recording-analytics/60779>\
**Category:** Feature Requests\
**Created:** [November 27, 2021, 5:59pm UTC](https://devforum.zoom.us/t/using-javascript-to-open-by-view-tab-in-recording-analytics/60779 "2021-11-27T17:59:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hakkarainen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hakkarainen/32/15296_2.png) [@Hakkarainen](https://devforum.zoom.us/u/Hakkarainen)\
**Post date:** [November 27, 2021, 5:59pm UTC](https://devforum.zoom.us/t/using-javascript-to-open-by-view-tab-in-recording-analytics/60779/1 "2021-11-27T17:59:52Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
While waiting for feature request (ZOOM-257473, API access to recording analytics), I’m trying develop a workaround using AppleScript and JavaScript.  
I want to download the .csv file that contains the information in the “By View” tab. Currently, I can open the page and download the Summary information.  
Here’s what works.

```auto
# shell command:
# osascript thisScript $UUID
on run argv
	set mydomain to "mydomain"
	set theURL to "https://" & mydomain & ".zoom.us/recording/analytics?meeting_id="
	set theClassName to "zm-button__slot"
	set elementnum to 0
	set UUID to item 1 of argv
	tell application "Safari"
		activate
		tell application "Safari" to open location theURL & UUID
		-- Login function omitted from example
	end tell
	clickClassName("zm-button--link", 0)
end run
to clickClassName(myClassName, elementnum)
	tell application "Safari"
		do JavaScript "document.getElementsByClassName('" & myClassName & "')[" & elementnum & "].click();" in document 1
	end tell
end clickClassName

```

I’ve not been able to figure out a way to click on the `By View` tab and then on the `Export as CSV file` link. I’d appreciate any guidance.

\*\*Screenshots \*\*

 ![Screen Shot 2021-11-27 at 12.58.36 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/b/db85c3e27018d34c00480db0fcac6c49d2482fee.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 28, 2021, 4:00am UTC](https://devforum.zoom.us/t/using-javascript-to-open-by-view-tab-in-recording-analytics/60779/2 "2021-12-28T04:00:28Z")

</div>

Closed on December 28, 2021, 4:00am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
