Configure the B2COPY Leaderboard and Account Statistics widgets

Learn how to embed the B2COPY Leaderboard and Account Statistics widgets into web pages

This instruction explains how to embed the Leaderboard and Account Statistics widgets from the Web UI into external web pages.

The Leaderboard widget enables your clients to view a list of top-performing master accounts without requiring authentication. By clicking on an account, they can see detailed trading statistics in the Account Statistics widget. To subscribe, clients click the Follow button:

  • In full B2COPY solutions, clients are redirected to the Web UI Sign In page, where they can sign up or sign in if already registered and finish the subscription.

  • In standalone solutions, clients can enter their trading account credentials and subscribe directly from the widget, or navigate to the Sign In page.

The widgets are embedded using the standard HTML <iframe> element — no additional scripts or coding are required.

The embedded Leaderboard supports all standard options, including:

  • Sorting and filtering

  • Searching with the Find account by login option

  • Navigating between Account Statistics and the Leaderboard

  • Switching between card and table views

  • Toggling between light and dark themes

View and test the Leaderboard widget functionality

You can view how the embedded Leaderboard widget may appear on a web page and test its functionality by visiting the B2COPY product page, under the Easy integration to your CRMs section.

The <iframe> code for the Leaderboard widget

You can insert the <iframe> anywhere on a web page where you want the Leaderboard to appear. The <iframe> must contain a properly formatted URL.

The URL format for full B2COPY solutions and standalone solution is similar. The difference is that full B2COPY solutions use /widget in the URL, while standalone solutions use /external.

<iframe src="https://example.com/en/widget/{platform_id}/{platform_type}/leaderboard"></iframe>

where:

  • https://example.com — your Web UI domain.

  • en — the language code for English. You can replace it with any other language code supported in your Web UI.

  • {platform_id} — the identifier of the investment platform instance (such as for MT4, MT5, and so on). For details, refer to Obtain the identifier of the investment platform instance.

  • {platform_type} — the type of platform:

    • copy — for copy trading

    • mam — for MAM

    • pamm — for PAMM

For example:

<iframe src="https://demo-full.b2copy.b2broker.com/en/widget/1/copy/leaderboard"></iframe>

The <iframe> code for the Account Statistics widget

To embed the Account Statistics widget for a specific account on a web page, insert the <iframe> at the desired location. The <iframe> must include the same URL parameters as for embedding the Leaderboard widget, with the addition of the specific account number.

The URL format for full B2COPY solutions and standalone solution is similar. The difference is that full B2COPY solutions use /widget in the URL, while standalone solutions use /external.

<iframe src="https://example.com/en/widget/{platform_id}/{platform_type}/leaderboard/{account_number}"></iframe>

where:

  • https://example.com — your Web UI domain.

  • en — the language code for English. You can replace it with any other language code supported in your Web UI.

  • {platform_id} — the identifier of the investment platform instance (such as for MT4, MT5, and so on). For details, refer to Obtain the identifier of the investment platform instance.

  • {platform_type} — the type of platform:

    • copy — for copy trading

    • mam — for MAM

    • pamm — for PAMM

  • {account_number} — the number of the account for which Account Statistics you want to display on a web page.

For example:

<iframe src="https://demo-full.b2copy.b2broker.com/en/widget/1/copy/leaderboard/2838035"></iframe>

Apply a light or dark theme to widgets

To match the embedded widgets with your web page style, you can force a specific theme by adding ?theme=dark or ?theme=light to the URL.

<iframe src="https://example.com/en/widget/{platform_id}/{platform_type}/leaderboard?theme=dark"></iframe>

Obtain the identifier of the investment platform instance

1

In the Back Office, go to Investment Platform > Platform Manager.

2

Find the required platform and click the Edit button in its row.

Platform Manager
Platform Manager

The identifier of the investment platform instance is the last number in the platform URL. In the example below, the identifier is 11.

The investment platform ID in the URL
The investment platform ID in the URL

Last updated

Was this helpful?