Support > Apps > App path and file name

Apps: App path and file name

For each App, you need to specify what folder and file name to use. If you want Blitapp to use different folders when uploading two different captures to the same cloud (Google Drive, Dropbox, etc.), you need to create two Apps of the same type with different paths and file names.


If you were to use static paths and file names for your App, like /blit/capture.png, the files would be overridden every time capture is run. This is why you should use variables in the folder and file names. These variables are updated with the actual value every time the capture is run. These variables are split into different categories:

  • Time: month, day, year, etc., evaluated when the upload starts
  • Capture: capture name, URL, etc.
  • Other: random string, etc.



After the variables have been replaced with actual values, the folder and file name are "normalized": spaces and special characters are replaced with an underscore (_), etc.


Time variables

<year>: 4-digit year, e.g., 2019

<month>: 2-digit month, e.g. 02

<day>: 2-digit day of the month, e.g., 09

<hour>: 2-digit hour of the day, 24-hour format, e.g., 15

<minute>: 2-digit minute, e.g. 01

<date>: same as <year>-<month>-<day>, e.g. 2019-02-09


Capture variables

<capture_name>: the name of the capture. The name will be normalized, so "My Capture" will become My_Capture.

<browser>: the browser used, e.g., Chrome

<country>: the country selected, e.g. USA

<height>: the browser height, e.g., 1024

<width>: the browser width, e.g. 1280

<size>: the size of the screenshot, e.g., Full_Page or Screen


<domain>: the link hostname, e.g. www.google.com

<url>: the full link. After normalization, https://www.google.com/?q=test&gd=USA would become https_www.google.com_q_test_gd_USA (except for Google Drive)

<file>: the URL file name, or anything between the last slash (/) and the query (?), e.g., index.html


To limit the maximum length of the <domain>, <url> and <file> variables, you can include a maximum number of characters to include:

<url:100> for a maximum of 100 characters

<domain:15> for a maximum of 15 characters

<path:10> for a maximum of 10 characters


Trackers

You can use the value retrieved by a tracker with the variable <tracker:id>. The id identifies the tracker associated with the capture:

  • Amazon: amazon_category_rank, amazon_search_rank
  • Google: google_search_rank
  • Twitter: twitter_retweets, twitter_likes, twitter_quotetweets
  • Youtube: youtube_views, youtube_likes, youtube_comments
  • Page: title


if multiple trackers with the same ID are found, the first one will be used.


Other variables

<random>: a random string in a form of a UUID, e.g. 936cbd00-ea49-11e9-8c5f-a901c1b99c6b

<count>: for a group of URLs, the index of the URL, e.g., 0, 1, 2, ... if the capture has only one URL, it will always be 0.


Examples

Here are some examples of path and file names for different types of captures.


mysite.com/<date>.png

For a daily capture of the website Browshot.com, you could save all the captures in the same path browshot.com and use <date>.png as the file name.

  • Captures path: browshot.com
  • Captures file name: <date>.png

The captures will be uploaded as browshot.com/2019-10-18.png, browshot.com/2019-10-19.png, etc.


<date>/<capture_name>/<domain>.png

For a daily capture of 3 websites (mysite.com, mysite.net, and mysite.org), use the domain name of each URL as the file name and the data and name of the capture for the folder.

  • Captures path: <date>/<capture_name>
  • Captures file name: <domain>.png
  • Used with capture name "My Capture"

The captures will be uploaded as 2019-10-18/my_capture/mysite.com.png, 2019-10-18/my_capture/mysite.net.png, 2019-10-18/my_capture/mysite.org.png.