Embedding Custom Reports In Your Client Panel

While w have direct integrations with SERP Robot and SERP Book for SEO reporting, you may want to embed other reports such as BrightLocal in your Client Panel.

Step 1: Create a field for report URL

You’ll need to save the report URL in your customer’s account. Go to Settings > CRM fields and create a new custom field called “Report URL”. To prevent clients from editing the field’s value you can uncheck the “Show field in client profile” option (it will still be editable by your team).

Note the field ID (1 in the example above) as we’ll need it later.

Step 2: Create a new page

We need a custom page to show the report. Go to Settings > Client panel templates and create a new page called “report”. Paste the code below in the page contents:

{% extends ajax ? "layout_ajax.html" : "clients/layout.html" %}
{% set body_class = 'full-height' %}

{% block content %}
    {% if user.custom_fields.1 %}
        <iframe src="{{ user.custom_fields.1 }}"></iframe>
    {% else %}
        <div class="well">Report isn't available</div>
    {% endif %}
{% endblock %}

Make sure to replace 1 in the user.custom_fields property to match the custom field’s ID where report link is stored. We’re also setting the body_class to full-height in order to make the embedded iframe full height.

Go to Settings > Client Panel menus and add a new sidebar link to the report. Use the dropdown next to the Link URL option to select your new Report page.

Now you can update a client’s account with the report URL and sign in as the client to see how it looks.

Updated over a week ago

Thanks for your feedback 🙏

Was this helpful?