WordPress: Automatically mark advertising links to Amazon and Co.

Wordpress
Wordpress

WordPress blogs are often the target of warnings that are not labeled.

As you know, I often refer to Amazon in this blog when I recommend products that I personally like or use myself. Even if there are any innovations that I may not have used myself yet, but which are worth mentioning from my point of view, I like to set links to online retailers or manufacturers. For the reader this is basically a practical service, but German law unfortunately sees things differently: For bloggers, competition law is a rather difficult jungle that can give you a warning about any missteps. As the author of the blog, you were usually completely unaware of the situation and you are accordingly surprised when a warning comes into your house.

Practical example: Amazon partner links

Every blogger who tries to earn a bit of money with his blog is probably familiar with an example from practice: Anyone who, for example, links to Amazon and integrates their partner ID in order to receive commissions, acts - as far as I can after reading can judge some specialist texts - commercially, because he has an intention to earn money with the article and the link. In this case, it is important to mark the links to Amazon as advertising. Otherwise you can be warned for surreptitious advertising or similar things and may have to pay a proper fine. Of course you want to avoid this and accordingly it makes sense to mark the affiliate links in the entire blog.

Automatic marking of affiliate links

Regarding the labeling of Amazon and other affiliate links, I looked at big players like Heise and Giga and saw that they put an asterisk "*" behind every link to Amazon and then write in the footer of the page "* = sponsored link":

Link marking Giga

Here you can see the identification that Giga.de uses for the Amazon links. This can also be found at other large portals and for this reason is probably currently the best legal and technical solution.

Having to maintain all of this manually in a blog is a bit annoying and prone to errors. Especially if you have been filling your blog for years and now have to mark all the links afterwards, it quickly becomes a very time-consuming activity. For this reason I was looking for a way to automatically add an asterisk to these links to amazon.de or to other affiliate domains. I got a little help with this the article by Clemens even though the implementation of variant 1 in my WordPress blog directly in the style.css of the theme simply did not work. For this reason I have "tinkered" a solution that can be implemented with a plugin and is very easy to adapt for other domains except amazon.de.

My solution with a WordPress plugin to mark external links

I've had this for years "Link Indication" plugin in use, with which external links can be automatically provided with target = "_ blank" so that they can be opened in a new window or tab. On the other hand, you can use it to set links to specific domains to nofollow and also provide them with small graphics, so that, for example, you have a small "W" behind Wikipedia links - like here: Wikipedia entry by Steve Jobs.

Unfortunately, the plugin has not been updated for years, but it still works perfectly with WordPress 4. And there shouldn't be any major security gaps due to the limited functionality.


Update 30.05.2017/7/XNUMX: The "Link Indication" plugin is unfortunately not compatible with PHP XNUMX. This means that if your web hosting is running with it, you may get an error message on the WordPress site after activating the plugin or part of the content is cut off (since the output starts where the error message is normally displayed). I had a programmer rewrite the plug-in to make it PHP 7 compatible. If you would like to have it, please write me a short email using the address in the imprint.

Update 9.8.2017/XNUMX/XNUMX: Simple labeling via CSS. For example, if you want to mark all links to Amazon via the CSS file, there is an easy way to do this that works completely without a plugin. Using the example of Amazon links, it would look like this:

a [href * = "amazon.de"]: after {content: "(advertising link)"; }

This means that the addition "(advertising link)" is displayed behind every link to amazon.de. Unfortunately also with pictures at the moment, which is a bit of a shame. If I can find a way to hide this marking on photos, I'll write it down here.


Once you have installed and activated the plugin, two settings are important: at the top you tick the box so that the css file is used in the plugin directory and at the bottom of the domains you add amazon.de with an entry and select the CSS class "star". I have included a graphic with all my settings for you, with the important ones marked in red:

Link Indication Plugin settings

These settings are entered in my Link.Indication plug-in. Imitation desired. :)

Now only one entry is missing in the CSS file of the plugin. You can find this in the plugin directory, which you call up with an FTP program of your choice (I use Transmit from Panic on the Mac):

/ wp-content / plugins / link-indication /

The "link-indication_style.css" file is located in this directory. You call it up with a text editor and add the following line below:

a.stern: after {content: "*"; }

Then you save the file and call up a post with an Amazon link. A "*" should now appear behind the link. If you also use other affiliate providers, such as Affili.net, then add their tracking domain "webmasterplan.com" to the domain list in the link indication plugin and use "star" as the CSS style. . This way, other links are also marked quickly.

Small book tip on the side ...

Social Media Marketing & LawWith this label, your blog has definitely become a bit more legally secure. But there are numerous other problem areas that can quickly cost an inexperienced blogger hundreds or thousands of euros through warnings. The lawyer Thomas Schwenke has to an informative book called "Social Media Marketing & Law" written that explains many things such as Facebook buttons, data protection, statistics plugins and the like in conjunction with German law for bloggers. So that it is really helpful, solutions are of course also described how you should design your blog and social media communication so as not to run into a warning trap. Money well spent, sure!

 

-

Did you like the article and did the instructions on the blog help you? Then I would be happy if you the blog via a Steady Membership or at Patreon would support.

8 comments

  1. […] I read on Sir Apfelot that a plug-in does exactly that: a clear identification of the target domains. For example, you could mark every link that leads to Amazon with an asterisk while writing. But that could be tedious when a lot of Amazon links are in use. Finding them all could be a pretty big endeavor. But you could just use that plugin. This then searches the outgoing links to see if they lead to Amazon. And if such a link is found, a predefined character (e.g. an asterisk) is set as an identifier. [...]

  2. Michel says:

    Hi Jens,

    thank you for the plugin tip! I didn't even know that.

    I also keep it that way that I mark affiliate links on my pages with an asterisk and the corresponding note in the footer.
    Unfortunately, in the heat of the moment, it happens every now and then that I forget the asterisk. The plugin can be a really good help here. Will definitely try it out!

    Best regards,
    Michel

  3. Rainer says:

    Hi Jens,

    I came across this post through another blog that linked here.

    I will try out the option you have described in the morning right away. I hope that works.

    Best regards,

    Rainer (aka Azon professional)

    • sir appleot says:

      I keep my fingers crossed that it will help. Please excuse me for removing your page from the comment. I don't want my blog to be overrun with links to make money and keyword domains and short "Great tip, let's give it a try!" Comments. I hope you understand.

  4. Karsten says:

    Oh how awesome, was my first thought when I read this! :-)

    That was the solution to my problem: to star hundreds of Amazon links in tens of posts.

    Thought, done - everything was done in 5 minutes! :-)

    But unfortunately it doesn't work: Now only the headline of the last post is displayed. All other content is gone as long as the plugin is active. If I switch it off, everything is back immediately.
    Tried it in 2 blogs with different themes - identical behavior.
    Don't understand how so little CSS can do that.

    Do you have an idea?

    • sir appleot says:

      Hello Karsten! I could imagine that it is because of the plugin. I couldn't handle PHP7 anymore and it threw errors. A programmer redesigned it so that it is compatible with PHP7. I'll send it to you by email! Then you still have to make the adjustments from the article that are necessary in the WP-Admin. I've already changed the CSS. LG! Jens

      • Karsten says:

        hey jens,

        Thank you for the effort. Yes, I have PHP 7 too! :-)

        Because I wanted to have it done, I researched further and came up with this solution, which only inserts additional CSS and does not require a plugin:

        a [href * = "amazon.com"]: after, a [href * = "amazon.de"]: after, a [href * = "amzn.to"]: after {content: "*"; }

        That's it. :-)

        The catch was that Amazon not only produces links under amazon.de and .com. But also under the somewhat strange TLD amzn.to. You have to come on it for now! :-)

        Best regards,

        the Karsten

        • sir appleot says:

          Hello Karsten! Well, that is of course the most elegant solution! One less plugin can't hurt either! I still leave the plugin active because I want to mark other links with the graphics. Certainly I can use CSS somehow, but I'm not that big of a hero. : D But thanks for your addition! It's really great! LG! Jens

Leave a Comment

Your e-mail address will not be published.