Integrating the report with your platform

Copyleaks offers a full white label plagiarism report that you can use as-is and show the data in your own platform.

Two types of reports are provided:

1. One-to-many Report

This report shows the submitted text on the left side and all of the results that were found on the right side. It will also include an aggregated plagiarism score based on the percentage of text that is similiar in all of the results combined. For exmple, if you submitted 100 words for a scan and Copyleaks found 20 similar words in one source and another 10 similar words from a second source, the overall similarity score would be 30%. Click on each result to open the one-to-one report. The one-to-many report is only available for the Education API.

Example for a One-to-many report:

URL Template

When receiving the results from the API, you will automatically receive a URL that will lead to a report.

Example:
https://copyleaks.com/compare-embed/education/{PID}/{PageNum}
Example URL:
https://copyleaks.com/compare-embed/education/a932c6d0-c32s-4d12-aw3e-dbv37bccc2a6/1

The URL created will lead to your full one-to-many report.

2. One-to-one Report

This report shows your submitted text on the left side compared to one specific result on the right side. A plagiarism score is calculated only based on the percentage of similar text between the submitted content and the specific result.

Example for a One-to-one report:

URL Template

You will get the One-to-one report as part of the response from the Results method that will include a field named report with the relevant One-to-one URL for the specific result.

Report URL template:
https://copyleaks.com/compare-embed/education/{PID}/{RID}/{PageOnSource}/{PageOnResult}


Access Management

As default and for privacy reasons, the report is only accessible by the user that submitted the scan. Anyone who is not logged in or logged in as another user will not be able to acces the report.

In some cases you will want to share the report with other users and for this you will need to create a temporary or permanent key that will give the user a read-only permission to view the report.

Managing Read-only Keys

In order to initially create the key, use the Post method. If you already have a key and you would like to retrieve it, use the Get method.

At any point you can revoke the access to your report by using the Delete.

Once you have the key, add ?key=yourkeyhere to the URL, for example:


Report Customization

You can use the report in two ways:

In both cases you can customize the report UI for the end users, using the parameters that are being passed through the query strings.

Using the query-string

Since paramters are being passed in the query as strings, it's crucial to encode the strings before placing them in the url.

Adjusting the embedded report height

In order for the report to look natural on your platform, without having two seperate scroll bars, add the following script to the parent window, so the IFrame will adjust the content accordingly:

<script>
    //The iframe's height changes dynamically as it is populated with content
    //Here you can register to the iframe's height changed event. If the iframe container sets the iframe height
    //according to the events height, no scroll bars will be visible - a nicer user experience
    window.addEventListener("message", receiveMessage, false);
    var firstCall = true;
    //Called when iframe height is updated.
    function receiveMessage(event) {
        console.log(event.data);
        var iFrame = document.getElementById('iFrame1');
        iFrame.height = event.data;
    
        //For best integration, let the iframe know your windows height.
        if (firstCall) {
            iFrame.contentWindow.postMessage('' + window.innerHeight, '*');
            firstCall = false;
        }
    }
 </script>
Example for a dynamic height report:

Editing the report title

You can edit the main title of the report by adding the query string parameter title to the url. By default, we will show a title that we found to best fit the scan (file name, page title etc.).

For example, to present the title "Hello world" encode the title (result: "Hello%20world") and then add this query string to the URL:

?title=Hello%20world

Back Arrow Customization

Enable/disable the Back Arrow

You can enable or disable the back arrow from the report using the backEnabled parameter.

Optional values are true or false. The default value is true.

To control it, use:

?backEnabled=true|false
Replace the Back Arrow link

You can link the back button to any url by adding the 'backurl' parameter with the URL:

Example:

?backUrl=http%3A%2F%2Fyouradddress.com

Hiding the title strip

You can remove the title from the report by using the heading parameter.

Optional values are true or false. The default value is true.

Example:

?heading=true|false

Hiding the "scan properties"

You can delete the scan properties by using the properties parameter.

Optional values are true or false. The default value is true.

Example:

?properties=false|true