Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
February 6Feb 6 On 2/6/2025 at 7:18 PM, virap1 said: I need it inside the <head> as that is where the auto ads javascript goes.You can use the Google Analytics integration to insert Javascript includes into the <head>
February 6Feb 6 Author this has been mentioned before, but as I explained I need to show that only to guests and not show that in 2 forums. I don't think the google analytics solution can do that.
February 6Feb 6 On 2/6/2025 at 7:25 PM, virap1 said: this has been mentioned before, but as I explained I need to show that only to guests and not show that in 2 forums. I don't think the google analytics solution can do that.Currently, there is not anything else which will place this in the <head> and allow for customization like you need. You can place the Javascript in the body to get the results you want but not sure if Google will be against that.
February 6Feb 6 On 2/6/2025 at 7:30 PM, Jim M said: Currently, there is not anything else which will place this in the <head> and allow for customization like you need. You can place the Javascript in the body to get the results you want but not sure if Google will be against that.As many use Adsense or other ad providers to monetise their forums we do need a solution to place the JavaScript ad code into the head section and based upon weather user is logged in or not or has bought a subscription (nexus) to remove the ads. the solution as it is in v4 where a custom location could be set for the ad script and including it in the globalTemplate head section was a good solution.As this is missing in v5 we definitely need a valid alternative. Weather it’s a hook that ads the script to the head section or something else, we would need a solution.
February 6Feb 6 On 2/6/2025 at 7:37 PM, Sander Vancanneyt said: As many use Adsense or other ad providers to monetise their forums we do need a solution to place the JavaScript ad code into the head section and based upon weather user is logged in or not or has bought a subscription (nexus) to remove the ads.the solution as it is in v4 where a custom location could be set for the ad script and including it in the globalTemplate head section was a good solution.As this is missing in v5 we definitely need a valid alternative. Weather it’s a hook that ads the script to the head section or something else, we would need a solution.The advertisement module will still allow you to filter based on member group. However, <head> is not an option of where the advertisement code is injected. If you require this, I would suggest creating a Feedback topic for it.
February 6Feb 6 There is a hook point available in the <head> tag, but there is a bug which is preventing it from being shown in some installations. That bug has been fixed and the fix will be available soon.
February 6Feb 6 Author Thanks. Can you share some details? what is the name/path of the hook? is it under the system? when will this be availlable?
February 6Feb 6 On 2/6/2025 at 8:16 PM, Esther E. said: There is a hook point available in the <head> tag, but there is a bug which is preventing it from being shown in some installations. That bug has been fixed and the fix will be available soon.Ok, so when using a hook, syntax to check user groups that should get ads would be (documentation lacks a bit what the member object contains):{{if !in_array(member.id.primaryGroup.id,[4,9,17,282] }} Ad code here {{endif}}
February 6Feb 6 On 2/6/2025 at 4:59 PM, virap1 said: What I am doing wrong?It's usually obvious, btw.(Sorry. I tried to hold back, but I couldn't help myself.) On 2/6/2025 at 8:26 PM, virap1 said: Thanks. Can you share some details? what is the name/path of the hook? is it under the system? when will this be availlable?System -> front/global/globalTemplate -> headAs to when it will be available, that would be a question for @Matt .