## Is your feature request related to a problem?

When setting up dashboards I'd like to filter the stats to a certain page/subdomain. 

## Describe the solution you'd like

Allow adding a extra filters for all graphs on a dashboard (e.g. filter by $current_url)

## Describe alternatives you've considered

Updating every graph in dashboard one-by-one and then reverting them back.

## Additional context

Related to https://github.com/PostHog/posthog/issues/780

Datadog has a decent solution for this: https://docs.datadoghq.com/dashboards/template_variables/, which I think we can simplify and use ourselves.

Came up during #2560 

#### *Thank you* for your feature request – we love each and every one!

posthog/api/dashboard.py
import json
import secrets
from typing import Any, Dict, Sequence, Type, Union, cast
from django.db.models import Prefetch, QuerySet
from django.http import HttpRequest
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from django.views.decorators.clickjacking import xframe_options_exempt
from rest_framework import exceptions, mixins, response, serializers, viewsets
from rest_framework.authentication import BaseAuthentication, BasicAuthentication, SessionAuthentication
from rest_framework.permissions import SAFE_METHODS, BasePermission, IsAuthenticated, OperandHolder, SingleOperandHolder
from rest_framework.request import Request
from posthog.api.insight import InsightSerializer, InsightViewSet
from posthog.api.routing import StructuredViewSetMixin
from posthog.api.shared import UserBasicSerializer
from posthog.api.tagged_item import TaggedItemSerializerMixin, TaggedItemViewSetMixin
from posthog.auth import PersonalAPIKeyAuthentication
from posthog.constants import INSIGHT_TRENDS
from posthog.event_usage import report_user_action
from posthog.helpers import create_dashboard_from_template
from posthog.models import Dashboard, DashboardTile, Insight, Team
from posthog.models.user import User
from posthog.permissions import ProjectMembershipNecessaryPermissions, TeamMemberAccessPermission
from posthog.utils import render_template
class CanEditDashboard(BasePermission):