Translate and Crawler Traffic

I have the plugin installed on two sites and the usage of Google Translate’s API seems to be highly correlated to crawler traffic. Does the plugin only translate posts when a user clicks the :globe_with_meridians:?

3 Likes

Yes I think that’s exactly how it works.

3 Likes

To be more specific, the plugin is only translate once per language per post. However, the post will have to be translated again should the post be revised.

4 Likes

Hi. I’m responsible for one of the sites that @yanokwa mentioned in his post above. Our translation costs over the first two months of use after installing this plugin have been much higher than expected, considering the normal traffic volume on our site and our expectations for what percentage of our community would make use of this plugin.

When I compare a graph of our Google Translate API spend from this plugin for August with the Discourse site traffic report for the same period I see the following:

What this appears to show is a very strong (almost 1:1) correlation between the daily fluctuation in our API spend and in web crawler traffic to our Discourse site. This is especially notable on August 2-3 and 14-15 in these charts.

This leads me to believe that the majority of these API requests are actually being triggered by bot traffic somehow. We’re continuing to monitor the situation, but if trend continues we will likely disable the plugin, unless we can identify some other aspect of our configuration that may be contributing to this. Could you potentially look into this on your end, or do you have any suggestions or plugin/Discourse configuration that we should double check?

6 Likes

In Google’s dashboard, are you able to breakdown the type of translation that was requested? The plugin utilizes the detect language endpoint and translation endpoint.

6 Likes

Good question. It looks like the large majority (99%) of the API requests over the past 30 days are detect language:

7 Likes

This is kind of expected since we queue a job to detect the language of the post when a post is created or read for the first time since the plugin has been installed. We can’t defer the detection since we need to know the post’s language in order to decide if the translation button should be shown to the user.

6 Likes