Dashboard templates simultaneously showcase the use cases of PostHog and make it easier for users to get started. You can find a full list of them on the templates page.
This is "internal" documentation to show PostHog staff how to add new global templates.
Let us know on this GitHub issue if you'd like to see templates that are private for your team.
Creating a new dashboard template
Create your dashboard with all the insights you want on it. Be sure to add descriptions to both.
Open the dashboard dropdown, click “Save as template.”
Add variables as objects with the format below. Reference them in your template by adding the ID in curly brackets, like
{SIGNUPS}
, to replace the placeholder event.
"variables": [{"id": "SIGNUPS","name": "Signups","type": "event","default": {},"required": true,"description": "The event you use to define a user signing up"}],
Once done, click “Create new template.” Test that it works in the team project.
Create a dashboard image in Figma in the Hoggies file. Make the size of image small (like 396x208). Export and upload to Cloudinary.
With the URL, go to templates tab under dashboards, click the three dots to the far right of your template, and click “Edit.” Add the URL to the
image_url
field and press Update template.For the website, copy the same hedgehog as a small square thumbnail image (400x400) with a transparent background. Export and upload to Cloudinary.
While you are in Figma, create a 1920x1080 feature image with a couple of the insights. Export and upload to Cloudinary.
In the
posthog.com/contents/templates
folder, copy another.mdx
file from another template, and modify for your new template. Add the thumbnail and feature images you uploaded to Cloudinary.Open a pull request.
Once merged, click the three dots on the far right again, and click “Make visible to everyone.”
To add to EU Cloud, click the three dots to edit the template and copy the JSON. Go to the PostHog EU Cloud instance, create a new blank dashboard, click "Save as template", paste the JSON (minus
deleted
,created_at
,created_by
,team_id
, andscope
), and "Create new template." Addimage_url
, edit, and test if needed. Finally, make visible to everyone.