1

Is there any plugin for adding FB adverts code on joomla similar to Google anlytics plugins, so that it can be enabled on every page at a time.

To put it more simple is there some plugin which can add some java script code to each and every page on Joomla website with a single time insertion of code.

Thanks in Advance

  • How did you go with this issue? Did one of the answers below solve your issue. Please progress your question to a system-recognized resolution. (The green tick) – mickmackusa Feb 3 at 2:39
1

First, it's always a good idea to check the Joomla Extension Directory if you're looking for a plugin/extension. You'll never know what you can find if you don't look. ;)

Second, you may not need a plug in for this. Assuming that you have:

  1. a code snippet with instructions on how to embed it
  2. access to your site's template files if needed

you can just use a module or two to get things working. This isn't just for Facebook ad embeds, but any kind of embed that has a script and some target markup.

First, paste your target div in a module, or an article, and assign it to the position you want the embed to appear in. Next, paste the script in a module that is assigned to a position that's used for script embeds. If you're template doesn't have one, or a way to add custom javascript, you can create one easily enough. This page in the Joomla Docs has all the info you need to do this. Just place the jdoc tag in a div before the closing body tag and hide the div using CSS (display:none;). Test your site to see if things are working properly. Assuming everything went as planned, you should have it working, no plugins required.

Now, if you really want to use a plugin, and you can't find one that works, it is possible to write you're own. This will require knowledge of PHP, Object Oriented Programming, Joomla's extension types, and Joomla's plugin events and types. You can get a crash course in plugin development by googling "Joomla Plugin Development." If you want, you can also hire someone to develop a plugin for you. Be warned, though, that can be very expensive.

I hope this helps out, I've never heard of embedding Facebook ads before, and I couldn't really find any info on it, so I have made a few assumptions on how it is supposed to work. If I have made some incorrect assumptions, let me know and I'll do my best to edit this answer to better fit what you actually need.

  • If I use a module, how i can place this module in every page of my website – Coder 477 Sep 26 '16 at 7:55
  • This is more like placing a script to run on every page of your website like how we add google analaytics and google tag manager to get the stats of clicks on each page of website – Coder 477 Sep 26 '16 at 8:02
1

Go to Extensions->Modules->New and select the "Custom" module type. Enter your code as needed then make sure on the "Menu Assignment" tab that "On all pages" is selected. Save the module and include it somewhere in your layout. That should do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.