Stacker
LoginSign upAstra Docs
  • Getting Started: Quick Guide
    • What is Stacker?
    • Key Features
    • Quick Overview of Stacker
    • What can I build in Stacker?
      • Creating a Home Page
      • Build an Internal Tool
    • Creating your first App
  • Stacker V 5(Astra) - Frequently Asked Questions
  • Account Settings
    • What is a Workspace?
      • Workspace Settings
      • Delete a Workspace
    • Adding Multiple Apps
      • Deleting an App
    • Subscriptions and Billing
  • Customer Access
    • Customer Access
  • Layout types
    • Layout Types
      • Layouts vs Custom Pages
    • Adding Custom Pages in Stacker
    • Detail Layout
      • Detail page widgets
        • Detail: Text Widget
        • Detail: Related Record Widget
        • Detail: Related Record List
          • Related record list widget not showing option
        • Detail: Quick Links Widget
        • Detail: Pipeline Widget
        • Detail: Highlights Widget
        • Detail: Fields Widget
          • Detail: Field Options
          • Separating fields into sections
        • Detail: Embed Widget
          • Embedding Google Maps
          • Embedding Airtable
          • Embedding Loom Videos
          • Embedding Vimeo
          • Embedding Youtube
          • Embedding Google Drive videos
          • Embedding Google Drive Images
          • Embedding content on a detail page
        • Detail: Callout Widget
        • Detail: Banner Widget
        • Detail: Big Numbers Widget
        • Detail: Charts Widget
      • Detail: Delete Record Button
      • Detail: Edit Button
      • Detail: Record Header
        • Change the title on the detail page
      • Detail: Tabs
        • Detail: Activity Tab
    • List Layout
      • Calendar Layout
      • List Options
        • List: Sort
        • List: Cover Image
        • List: Roles
        • List Layout: Change layout title
        • List: Inline Filters
        • List: Header
        • List: Duplicate Layout
        • List: Filter
        • Allow users to download list data as CSV
        • List: Relative Date Filtering
        • List: Field options
        • List: Show, Hide, and Reorder Fields
    • Customize the Form Layout
      • Creating multi step form
      • Auto-filling values into create forms
      • Set default values on Forms
    • Stacker Navigation
      • Navigation: Showing and hiding tables
      • Enable Breadcrumb Navigation
  • Permissions and Security
    • Introduction to Permissions
    • Configure a Permission Rule
      • Table Permissions
        • Editing Permissions
        • Multiple permission rules
    • Set up User Roles
      • Automatically assign Roles
    • Conditional Visibility
  • Customization
    • Client Logos
    • Customizing App Appearance
    • Getting started with CSS in Stacker
    • Custom CSS
    • Workspace Appearance
    • Custom Domain
      • Custom Domain not working
    • Whitelabel
    • Custom Scripts
    • Creating Buttons
      • Action Buttons
      • Add new button showing when it shouldn't
    • Translate your Stacker App
  • Users
    • Introduction to users in Stacker
    • Users: Overview
    • Users: Workspace Collaborators
      • Workspace Users
    • Users: App Users
      • Adding users to your app
      • Login flow for users
      • Open Signup
      • Registering and Logging in
    • Previewing an app as a user for testing
  • Data
    • Formula field
    • Rich Text
    • Third Party Integrations
      • FullStory integration
      • Intercom Integration
      • Zapier Integration
        • Sending an email with Zapier
      • Airtable
        • Syncing Schema and Data
        • Update Sharing link password
        • Real time Airtable sync
        • Upgrading Airtable data connections
        • Enabling tables and fields
    • Enable Color on Single and Multi Select Fields
    • Apply dynamic data filter to Link Fields
    • Importing data into Stacker
      • Importing data from CSV
    • Applying table data filters
    • Exporting data from Stacker
    • Creating lookups and rollups between tables
      • Creating links between tables
    • Stacker Tables: Editing field names and types
      • Stacker Tables: Pasting Data
      • Stacker Tables: Linked Fields
      • Stacker Tables: Editing and deleting tables
      • Stacker Tables: Creating a new table
      • Stacker Tables: Adding new fields
      • Stacker Tables: Adding and Editing Rows
      • Stacker Fields
  • Troubleshooting
    • There was an error saving your record
    • Unable to toggle on linked fields
Powered by GitBook
On this page
  • Add a Custom Script
  • Allow admins to add Custom Scripts to apps
  • Security Considerations
  1. Customization

Custom Scripts

PreviousWhitelabelNextCreating Buttons

Last updated 1 month ago

Custom Scripts allow you to bring in specific functionality and customizations that aren’t available natively in Stacker. For example, you can add a custom script for Google Analytics to learn about how your customers are using your Stacker app, or you could integrate with Weglot to translate your app into a different language.

This feature needs to be toggled on by a Workspace Owner. If you’re an app admin you’ll need to ask your workspace owner to enable this feature

Add a Custom Script

  1. Click App Settings

  2. Click General

  3. Click Custom Scripts

  4. Paste your custom script in the relevant box to Run Once or Per page change

  5. Enclose your script in script tags: <script> </script> comments can be included as well <!-- -->

  6. Click Save

Scripts to run once

  • The run once scripts run when the app component is mounted. In other words, when the app loads up for the first time, or the whole app is reloaded.

  • Scripts to be run once include Google Analytics and Google Tag Manager.

Scripts to run per page change

  • Whenever the URL changes, but the whole app doesn’t reload. This is noticeable by the app bar and navigation bar not disappearing.

  • Example of scripts to be run per page: FreshChat, Front App, Pendo and Weglot.

custom_script.gif

Allow admins to add Custom Scripts to apps

  1. Click Workspace Settings

  2. Click Advanced

  3. Find Enable self-serve custom scripts

  4. Select Everyone in the dropdown

  5. Click Save

App admins will now be able to add custom scripts to any app in your Workspace.

Security Considerations

Allowing app admins to insert custom scripts gives your admins a lot of flexibility to expand an app’s functionality and customizations. But there are some security implications you need to be aware of.

Custom scripts give you the power to execute arbitrary code in the browsers of anyone using the app where the code has been added.

That means the code has the potential to access any data that a user has access to in Stacker – including in other Stacker apps, and other workspaces the user is a member of.

In addition, it is theoretically possible to insert a script that breaks your app and makes your app unusable.

If you’re unsure about a script you’re considering adding to your apps, reach out to your Customer Success Manager to find out more.

Stacker doesn’t vet the scripts that are inserted into apps, so it is up to individual workspace owners to check any scripts inserted into apps in their workspaces themselves.

Screenshot_2023-05-24_at_13.41.36.png