 #  Examples 

 

##  Trigger Indexing API for Contact on Linked User Update 

 

  ![Trigger Indexing API for Contact on Linked User Update](https://cdn.richeyweb.com/images/tutorialmemes/woman-yelling-at-cat.webp)    The [Content - Indexing API](/software/joomla/plugins/content-indexing-api) plugin is designed to issue an indexing request to Google and/or Bing (via IndexNow) on content updates. It was built to initiate indexing on the built-in Joomla content types, but there are many 3rd party components that can generate content. In this example, we'll examine a unique combination in core Joomla components that I chose NOT to implement in Content - Indexing API specifically to allow me to use it as an example for 3rd party triggers. This way, we can go through all of the parts of this plugin using features present in ALL Joomla installations.

## But Why Would You Want To Do That?

For those reading and asking themselves "why would I need to update a contact after saving a user?" it is for this reason. User-linked contacts can display user custom fields. That means, if a user updates a field, the contact page will display the new information. Post-update, we want the search engines to re-index these update contact pages.

The actual trigger for the Content - Indexing API plugin is like 3 lines of code - it's super easy, barely an inconvenience. So the bulk of this document will describe WHY we're doing the things we're doing, to give you an idea of what you might need to do with your plugin for your custom content.

## A Indexing API User Plugin

[  User - Indexing API User/Contact 5.1.2573](/extension-repository/plg_user_indexingapiuser/plg_user_indexingapiuser-5.1.2)

### Joomla\\Plugin\\User\\IndexingAPIUser

I'm not going through ever line of the code in this document, but I will focus on key features that your plugin MUST have in order to activate the trigger. The plugin is named IndexingAPIUser - the name is not important to the function, name yours whatever you like. I will probably follow this naming convention IndexingAPI+PluginType+Whatever-else-I-need-to-make-it-distinct-and-self-explanatory. Probably not that long though.

First, a description of the basic plugin setup and features.

### indexingapiuser.xml

The plugin XML has only one config field - a usergrouplist field named validgroups. This field allows me to filter only users who I want to process. This might not be important to you, it's there because I thought it would be useful.

Your configuration file may or may not require any config fields. Remember, this is just a reference example that happens to be a practical application.

### indexingapi/src/Extension/IndexingAPIUser.php

The plugin itself is constructed like any User plugin. It extends CMSPlugin, it has a namespace, it has use statements. Specifically, you will need one key use statement to trigger indexing:

 ```
use Joomla\CMS\Event\AbstractEvent;
```

This particular plugin also requires the com\_contact RouteHelper class, which we load as ContactRouteHelper

 ```
use Joomla\Component\Contact\Site\Helper\RouteHelper as ContactRouteHelper;
```

### public function onUserAfterSave

The function begins as you might expect, with tests to determine if it should exit prior to indexing. It tests that the user id is present, that the save was successful and that the user is not new (because a new user won't be associated with a contact yet.) It then goes on to test that the user id has a valid Joomla user, and that the Joomla user is a member of one of the valid groups selected in the config.

Next, the plugin does a database query to retrieve any contacts that are linked to this user. This is the last test. If there are no linked contacts, the plugin exits.

### Testing the Contacts - the Last Step Before Indexing

Each of the contact records selected is then tested to ensure that they are:

1. Published
2. In the Public access level
 
If either of these tests fail - the contact is not sent to the index trigger.

### private function sendToIndexingAPI

Before someone asks - this function name is arbitrary, you could all it HaroldDoesStuff if you wanted. Indexing API has no opinion.

The DB contact object is sent to the indexer function. The contents of the object are simple, just enough to test the access level and published state, and enough to get a route from ContactRouteHelper (described above). For the Contact RouteHelper::getContactRoute function, we only selected from the database the needed fields - contact ID, Category ID, Language, published, and access, so our object looks like this:

 ```
$contact = (obj)[<br></br>    "id"=>1,<br></br>    "catid"=>1,<br></br>    "language"=>"*",<br></br>    "published"=>1,<br></br>    "access"=>1<br></br>];
```

RouteHelper::getContactRoute actually only needs the first 3 properties to run.

With this object, the plugin constructs another object containing the only properties that the indexer cares about - the link, state, and publish\_up properties:

 ```
$data = (object)[<br></br>    'link' => ContactRouteHelper::getContactRoute($contact->id, $contact->catid, $contact->language),<br></br>    'state' => 1,<br></br>    'publish_up' => (some date in the past)<br></br>];
```

To prevent 404s in content, the plugin checks the publish up date to determine if the article is published or not. For your plugin, as long as this date is in the past it will pass the test.

Next, we configure the arguments for the Content plugin event, (which is onContentAfterSave). This requires 3 arguments, one of which is the $data variable we just created.

 ```
$contentEventArguments = [<br></br>    'context' => 'IndexingAPIExternalTrigger',<br></br>    'subject' => $data,<br></br>    'isNew' => false  <br></br>];
```

Notice the context value. This is critical to the trigger. The Content - Indexing API plugin listens to various normal contexts, and this one very specific context that is used ONLY for external triggers. It's this context, or my plugin ignores it! Got it? Good!

Now the fun part - the star of the show, triggering the indexer. These are the 3 lines of code that separate your plugin that triggers the indexer from those who don't.

This particular implementation triggers ONLY the Content - Indexing API plugin event. No other onContentAfterSave Content plugin events are fired - so we can do whatever we want here. This is why I can safely send this very sparse data element to a Content plugin event without worrying that other Content plugins will puke because it's missing a key property. Here we go, I'll explain each line as necessary afterward.

 ```
$dispatcher = $this->app->getDispatcher();<br></br>PluginHelper::importPlugin('content','indexingapi',true, $dispatcher);<br></br>$dispatcher->dispatch('onContentAfterSave', AbstractEvent::create('onContentAfterSave',$contentEventArguments));
```

First, it's the dispatcher that loads and triggers events, so we get it from the application.

Next, we import ONLY the plugin we want to run, in this case the content indexingapi plugin.

Finally, we dispatch the event, with the arguments we just put together.

Like editing any regularly triggered content, your custom plugin will ALSO display the status messages (URL + Google and/or Bing statuses).

![Indexing Status](https://cdn.richeyweb.com/images/articles/plg_content_indexingapi/indexing-api-inception-cropped-2.webp)

## This is too much!!!

That's OK, not everyone is a developer. I see these things as puzzles to be solved, and I can be bribed to solve your puzzles for you. My criteria for doing it is relatively simple.

1. If the extension you want me to interface with is a commercial extension, you must purchase a license for me to use. I will not use your licensed software.
2. If you want exclusive rights to the resulting plugin, you're going to pay for it.
3. If you release all rights to the resulting software, allowing me to publish it for free - you get a discount.
 
Closed Source (you own it): $400  
Open Source (I own it): $200

Click the Contact Us link in the footer and send me a message.

## Frequently Asked Questions:

If you're charging to develop plugins that interface with Content - Indexing API, then why did you make a tutorial?Because I don't want to build these plugins. I want it to be so easy for 3rd party developers to do it, that they just do it and recommend users to come to me. The $200/$400 options are so that I can be compensated for the inconvenience of dealing with someone else's laziness.



Did you just call me lazy?No, I called 3rd party developers lazy for not wanting to spend the hour it takes to write this plugin.



But I am a 3rd party developer, did you just call me lazy.Oh, I supposed that I did.



If I pay $400 for exclusive rights, can I sell it on my own website?Sure, that's what you're paying for. If you ever need updates, however, it's going to be another $400 to have me make them AND keep it closed.



What are you going to do with the $200 plugin I paid for?I'm going to put it on my website for everyone to use, as an example of my work, and as a gift to the Joomla community that has given me so much. You'll get credit too.



Your sales pitch sucks.Yes, I'm not a salesman - I'm a developer. I can't stand salesmen. I don't want to be a salesman. My offers are black and white - take it or don't.



- [      email ](mailto:?subject=Trigger+Indexing+API+for+Contact+on+Linked+User+Update&body=https%3A%2F%2Fwww.richeyweb.com%2Fsoftware%2Fexamples%2Findexing-api%2Ftrigger-indexing-api-for-contact-on-linked-user-update)
- [      facebook ](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.richeyweb.com%2Fsoftware%2Fexamples%2Findexing-api%2Ftrigger-indexing-api-for-contact-on-linked-user-update)
- [      x-twitter ](https://twitter.com/intent/tweet?text=Trigger+Indexing+API+for+Contact+on+Linked+User+Update%3A+https%3A%2F%2Fwww.richeyweb.com%2Fsoftware%2Fexamples%2Findexing-api%2Ftrigger-indexing-api-for-contact-on-linked-user-update)
- [      linkedin ](http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.richeyweb.com%2Fsoftware%2Fexamples%2Findexing-api%2Ftrigger-indexing-api-for-contact-on-linked-user-update&title=Trigger+Indexing+API+for+Contact+on+Linked+User+Update&summary=The+Content+-+Indexing+API+plugin+is+designed+to+i...)
- [      pinterest ](http://pinterest.com/pin/create/button/?url=https%3A%2F%2Fwww.richeyweb.com%2Fsoftware%2Fexamples%2Findexing-api%2Ftrigger-indexing-api-for-contact-on-linked-user-update&media=https%3A%2F%2Fwww.richeyweb.com%2Fimages%2Farticles%2Fplg_content_indexingapi%2Findexing-api-inception-cropped-2.webp&description=Trigger+Indexing+API+for+Contact+on+Linked+User+Update)
 


 

   [  Previous article: Where is the API?   Where is the API? ](/software/examples/indexing-api/where-is-the-api)  

##### We Value Your Privacy

 

We use cookies to enhance your experience and for traffic analysis. By continuing to visit this site you agree to our use of cookies.

[Privacy Policy](/privacy-policy)

 Details 

###### Google Tag Manager Items

- Ad Storage
- Ad User Data
- Ad Personalization
- Analytics Storage
- Functionality Storage
- Personalization Storage
- Security Storage
 
 

 

 

 

 

 Decline Accept
```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.richeyweb.com/#organization","name":"RicheyWeb","url":"https://www.richeyweb.com/","logo":{"@type":"ImageObject","url":"https://www.richeyweb.com/images/logo/richeyweb.svg","contentUrl":"https://www.richeyweb.com/images/logo/richeyweb.svg","width":{"@type":"QuantitativeValue","value":38,"unitCode":"PX"},"height":{"@type":"QuantitativeValue","value":38,"unitCode":"PX"},"@id":"https://www.richeyweb.com/#logo"},"image":{"@id":"https://www.richeyweb.com/#logo"},"sameAs":["https://x.com/ComRicheyweb","https://www.facebook.com/RicheyWebDev/","https://www.youtube.com/channel/UCxnVG8BwOvQRO7hVqNX7T2g","https://community.joomla.org/service-providers-directory/listings/115:richeyweb.html"],"description":"RicheyWeb is a custom software developer specializing in Joomla extensions.","ContactPoint":[{"@type":"ContactPoint","url":"https://www.richeyweb.com/contact-us","telephone":"903-873-8460","contactType":"Owner/Administrator","areaServed":["United States",{"@type":"Country","name":"United States","sameAs":["https://en.wikipedia.org/wiki/United_States","https://www.wikidata.org/wiki/Q30","https://g.co/kg/m/09c7w0"]},"European Union",{"@type":"AdministrativeArea","name":"European Union","sameAs":["https://en.wikipedia.org/wiki/European_Union","https://www.wikidata.org/wiki/Q458","https://g.co/kg/m/0_6t_z8"]},"United Kingdom",{"@type":"Country","name":"United Kingdom","sameAs":["https://en.wikipedia.org/wiki/United_Kingdom","https://www.wikidata.org/wiki/Q145","https://g.co/kg/m/07ssc"]},"Australia",{"@type":"Country","name":"Australia","sameAs":["https://en.wikipedia.org/wiki/Australia","https://www.wikidata.org/wiki/Q408","https://g.co/kg/m/0chghy"]},"Canada",{"@type":"Country","name":"Canada","sameAs":["https://en.wikipedia.org/wiki/Canada","https://www.wikidata.org/wiki/Q16","https://g.co/kg/m/0d060g"]},"Russia",{"@type":"Country","name":"Russia","sameAs":["https://en.wikipedia.org/wiki/Russia","https://www.wikidata.org/wiki/Q159","https://g.co/kg/m/06bnz"]},"China",{"@type":"Country","name":"China","sameAs":["https://en.wikipedia.org/wiki/China","https://www.wikidata.org/wiki/Q148","https://g.co/kg/m/0d05w3"]}],"availableLanguage":"en"},{"@type":"ContactPoint","url":"https://www.richeyweb.com/bugs","telephone":"903-873-8460","contactType":"Technical Support","areaServed":["United States",{"@type":"Country","name":"United States","sameAs":["https://en.wikipedia.org/wiki/United_States","https://www.wikidata.org/wiki/Q30","https://g.co/kg/m/09c7w0"]},"European Union",{"@type":"AdministrativeArea","name":"European Union","sameAs":["https://en.wikipedia.org/wiki/European_Union","https://www.wikidata.org/wiki/Q458","https://g.co/kg/m/0_6t_z8"]},"United Kingdom",{"@type":"Country","name":"United Kingdom","sameAs":["https://en.wikipedia.org/wiki/United_Kingdom","https://www.wikidata.org/wiki/Q145","https://g.co/kg/m/07ssc"]},"Australia",{"@type":"Country","name":"Australia","sameAs":["https://en.wikipedia.org/wiki/Australia","https://www.wikidata.org/wiki/Q408","https://g.co/kg/m/0chghy"]},"Canada",{"@type":"Country","name":"Canada","sameAs":["https://en.wikipedia.org/wiki/Canada","https://www.wikidata.org/wiki/Q16","https://g.co/kg/m/0d060g"]},"Russia",{"@type":"Country","name":"Russia","sameAs":["https://en.wikipedia.org/wiki/Russia","https://www.wikidata.org/wiki/Q159","https://g.co/kg/m/06bnz"]},"China",{"@type":"Country","name":"China","sameAs":["https://en.wikipedia.org/wiki/China","https://www.wikidata.org/wiki/Q148","https://g.co/kg/m/0d05w3"]}],"availableLanguage":"en"}],"knowsAbout":["Computer programming",{"@type":"Thing","name":"Computer programming","sameAs":["https://en.wikipedia.org/wiki/Computer_programming","https://www.wikidata.org/wiki/Q80006","https://g.co/kg/m/01mf_"]},"PHP",{"@type":"Thing","name":"PHP","sameAs":["https://en.wikipedia.org/wiki/PHP","https://www.wikidata.org/wiki/Q59","https://g.co/kg/m/060kv"]},"JavaScript",{"@type":"Thing","name":"JavaScript","sameAs":["https://en.wikipedia.org/wiki/JavaScript","https://www.wikidata.org/wiki/Q2005","https://g.co/kg/m/02p97"]},"arduino","Computer forensics",{"@type":"Thing","name":"Computer forensics","sameAs":["https://en.wikipedia.org/wiki/Computer_forensics","https://www.wikidata.org/wiki/Q878553","https://g.co/kg/m/02wxbd"]},"White hat",{"@type":"Thing","name":"White hat","sameAs":["https://en.wikipedia.org/wiki/White_hat_(computer_security)","https://www.wikidata.org/wiki/Q7995625","https://g.co/kg/m/03ns_5"]},"Search engine optimization",{"@type":"Thing","name":"Search engine optimization","sameAs":["https://en.wikipedia.org/wiki/Search_engine_optimization","https://www.wikidata.org/wiki/Q180711","https://g.co/kg/m/019qb_"]},"Search engine marketing",{"@type":"Thing","name":"Search engine marketing","sameAs":["https://en.wikipedia.org/wiki/Search_engine_marketing","https://www.wikidata.org/wiki/Q846132","https://g.co/kg/m/06mw8r"]},"Digital marketing",{"@type":"Thing","name":"Digital marketing","sameAs":["https://en.wikipedia.org/wiki/Digital_marketing","https://www.wikidata.org/wiki/Q1323528","https://g.co/kg/g/122hcnps"]},"Web hosting service",{"@type":"Thing","name":"Web hosting service","sameAs":["https://en.wikipedia.org/wiki/Web_hosting_service","https://www.wikidata.org/wiki/Q5892272","https://g.co/kg/m/014pz4"]},"Email hosting service",{"@type":"Thing","name":"Email hosting service","sameAs":["https://en.wikipedia.org/wiki/Email_hosting_service","https://www.wikidata.org/wiki/Q5368818","https://g.co/kg/m/09w60m"]},"Internet hosting service",{"@type":"Thing","name":"Internet hosting service","sameAs":["https://en.wikipedia.org/wiki/Internet_hosting_service","https://www.wikidata.org/wiki/Q1210425","https://g.co/kg/m/09w5yw"]},"Virtual hosting",{"@type":"Thing","name":"Virtual hosting","sameAs":["https://en.wikipedia.org/wiki/Virtual_hosting","https://www.wikidata.org/wiki/Q588365","https://g.co/kg/m/024mvh"]},"Web performance",{"@type":"Thing","name":"Web performance","sameAs":["https://en.wikipedia.org/wiki/Web_performance","https://www.wikidata.org/wiki/Q7978612","https://g.co/kg/m/0gfj3f1"]},"Web content management system",{"@type":"Thing","name":"Web content management system","sameAs":["https://en.wikipedia.org/wiki/Web_content_management_system","https://www.wikidata.org/wiki/Q45211","https://g.co/kg/m/0615s2"]},"Content management system",{"@type":"Thing","name":"Content management system","sameAs":["https://en.wikipedia.org/wiki/Content_management_system","https://www.wikidata.org/wiki/Q131093","https://g.co/kg/m/0k23c"]},"General Data Protection Regulation",{"@type":"Thing","name":"General Data Protection Regulation","sameAs":["https://en.wikipedia.org/wiki/General_Data_Protection_Regulation","https://www.wikidata.org/wiki/Q1172506","https://g.co/kg/m/0pk_7xs"]},"SERP",{"@type":"Thing","name":"SERP","sameAs":["https://en.wikipedia.org/wiki/SERP","https://www.wikidata.org/wiki/Q2205811","https://g.co/kg/g/11c5szp7kc"]},"Artificial intelligence",{"@type":"Thing","name":"Artificial intelligence","sameAs":["https://en.wikipedia.org/wiki/Artificial_intelligence","https://www.wikidata.org/wiki/Q11660","https://g.co/kg/m/0mkz"]},"Prompt engineering",{"@type":"Thing","name":"Prompt engineering","sameAs":["https://en.wikipedia.org/wiki/Prompt_engineering","https://www.wikidata.org/wiki/Q108941486","https://g.co/kg/g/11p6kpgt_n"]},"E-learning",{"@type":"Thing","name":"E-learning","sameAs":["https://en.wikipedia.org/wiki/E-learning_(theory)","https://www.wikidata.org/wiki/Q182250","https://g.co/kg/g/122czm1f"]},"Sharable Content Object Reference Model",{"@type":"Thing","name":"Sharable Content Object Reference Model","sameAs":["https://en.wikipedia.org/wiki/Sharable_Content_Object_Reference_Model","https://www.wikidata.org/wiki/Q827811","https://g.co/kg/m/06_40"]},"Experience API",{"@type":"Thing","name":"Experience API","sameAs":["https://en.wikipedia.org/wiki/Experience_API","https://www.wikidata.org/wiki/Q7807728","https://g.co/kg/g/1yw9ktxr8"]},"Joomla",{"@type":"Thing","name":"Joomla","sameAs":["https://en.wikipedia.org/wiki/Joomla","https://www.wikidata.org/wiki/Q13167","https://g.co/kg/m/07qb81"]},"Nginx",{"@type":"Thing","name":"Nginx","sameAs":["https://en.wikipedia.org/wiki/Nginx","https://www.wikidata.org/wiki/Q306144","https://g.co/kg/m/02qft91"]},"MySQL",{"@type":"Thing","name":"MySQL","sameAs":["https://en.wikipedia.org/wiki/MySQL","https://www.wikidata.org/wiki/Q850","https://g.co/kg/m/04y3k"]}],"areaServed":["United States",{"@type":"Country","name":"United States","sameAs":["https://en.wikipedia.org/wiki/United_States","https://www.wikidata.org/wiki/Q30","https://g.co/kg/m/09c7w0"]},"European Union",{"@type":"AdministrativeArea","name":"European Union","sameAs":["https://en.wikipedia.org/wiki/European_Union","https://www.wikidata.org/wiki/Q458","https://g.co/kg/m/0_6t_z8"]},"United Kingdom",{"@type":"Country","name":"United Kingdom","sameAs":["https://en.wikipedia.org/wiki/United_Kingdom","https://www.wikidata.org/wiki/Q145","https://g.co/kg/m/07ssc"]},"Australia",{"@type":"Country","name":"Australia","sameAs":["https://en.wikipedia.org/wiki/Australia","https://www.wikidata.org/wiki/Q408","https://g.co/kg/m/0chghy"]},"Canada",{"@type":"Country","name":"Canada","sameAs":["https://en.wikipedia.org/wiki/Canada","https://www.wikidata.org/wiki/Q16","https://g.co/kg/m/0d060g"]},"Russia",{"@type":"Country","name":"Russia","sameAs":["https://en.wikipedia.org/wiki/Russia","https://www.wikidata.org/wiki/Q159","https://g.co/kg/m/06bnz"]},"China",{"@type":"Country","name":"China","sameAs":["https://en.wikipedia.org/wiki/China","https://www.wikidata.org/wiki/Q148","https://g.co/kg/m/0d05w3"]}],"memberOf":["Mensa International",{"@type":"Organization","name":"Mensa International","sameAs":["https://en.wikipedia.org/wiki/Mensa_International","https://www.wikidata.org/wiki/Q184194","https://g.co/kg/m/0140pf"]},"National Rifle Association",{"@type":"Organization","name":"National Rifle Association","sameAs":["https://en.wikipedia.org/wiki/National_Rifle_Association","https://www.wikidata.org/wiki/Q863259","https://g.co/kg/m/0j6f9"]},"CompTIA",{"@type":"Organization","name":"CompTIA","sameAs":["https://en.wikipedia.org/wiki/CompTIA","https://www.wikidata.org/wiki/Q597534","https://g.co/kg/m/040shq"]},"ISFCE LLC",{"@type":"Organization","name":"ISFCE LLC","sameAs":["https://isfce.com","https://g.co/kg/g/11wxm5r0rg"]}],"hasCredential":[{"@type":"EducationalOccupationalCredential","name":"Joomla 3 Certified Administrator","credentialCategory":"Certification","description":"Administrator Exam is the first available Joomla! certification exam","recognizedBy":{"@type":"Organization","name":"Open Source Matters, Inc.","sameAs":["https://en.wikipedia.org/wiki/Open_Source_Matters,_Inc.","https://g.co/kg/g/11f00wvjhz"]},"url":"https://certification.joomla.org/certified-user-directory/michael-richey","about":["Content management system",{"@type":"Thing","name":"Content management system","sameAs":["https://en.wikipedia.org/wiki/Content_management_system","https://www.wikidata.org/wiki/Q131093","https://g.co/kg/m/0k23c"]},"Web content management system",{"@type":"Thing","name":"Web content management system","sameAs":["https://en.wikipedia.org/wiki/Web_content_management_system","https://www.wikidata.org/wiki/Q45211","https://g.co/kg/m/0615s2"]},"Joomla",{"@type":"Thing","name":"Joomla","sameAs":["https://en.wikipedia.org/wiki/Joomla","https://www.wikidata.org/wiki/Q13167","https://g.co/kg/m/07qb81"]}],"educationalLevel":"expert","image":{"@type":"ImageObject","url":"https://www.richeyweb.com/images/contact/badge.webp","contentUrl":"https://www.richeyweb.com/images/contact/badge.webp","width":{"@type":"QuantitativeValue","value":300,"unitCode":"PX"},"height":{"@type":"QuantitativeValue","value":86,"unitCode":"PX"},"caption":"Joomla 3 Certified Administrator"}},{"@type":"EducationalOccupationalCredential","name":"Certified Computer Examiner","credentialCategory":"Certification","description":"Internationally recognized computer forensics certifiecation","recognizedBy":{"@type":"Organization","name":"ISFCE LLC","sameAs":["https://en.wikipedia.org/wiki/ISFCE_LLC","https://g.co/kg/g/11wxm5r0rg"]},"url":"https://isfce.com/","about":["Digital forensics",{"@type":"Thing","name":"Digital forensics","sameAs":["https://en.wikipedia.org/wiki/Digital_forensics","https://www.wikidata.org/wiki/Q3246940","https://g.co/kg/m/0cnxzfx"]},"Computer forensics",{"@type":"Thing","name":"Computer forensics","sameAs":["https://en.wikipedia.org/wiki/Computer_forensics","https://www.wikidata.org/wiki/Q878553","https://g.co/kg/m/02wxbd"]},"Mobile device forensics",{"@type":"Thing","name":"Mobile device forensics","sameAs":["https://en.wikipedia.org/wiki/Mobile_device_forensics","https://www.wikidata.org/wiki/Q6887097","https://g.co/kg/m/06zp3tp"]},"Network forensics",{"@type":"Thing","name":"Network forensics","sameAs":["https://en.wikipedia.org/wiki/Network_forensics","https://www.wikidata.org/wiki/Q7001032","https://g.co/kg/m/05pb280"]},"Database forensics",{"@type":"Thing","name":"Database forensics","sameAs":["https://en.wikipedia.org/wiki/Database_forensics","https://www.wikidata.org/wiki/Q5227405","https://g.co/kg/m/0cgqsy"]}],"educationalLevel":"expert","image":{"@type":"ImageObject","url":"https://www.richeyweb.com/images/contact/isfce-cce.webp","contentUrl":"https://www.richeyweb.com/images/contact/isfce-cce.webp","width":{"@type":"QuantitativeValue","value":150,"unitCode":"PX"},"height":{"@type":"QuantitativeValue","value":150,"unitCode":"PX"},"caption":"Certified Computer Examiner"}}],"hasOfferCatalog":{"@type":"OfferCatalog","name":"Web Services","itemListElement":[{"@type":"Offer","itemOffered":{"@type":"Service","name":"Hosting"}},{"@type":"Offer","itemOffered":{"@type":"Service","name":"Development"}},{"@type":"Offer","itemOffered":{"@type":"Service","name":"Search Engine Optimization"}}]}},{"@type":"WebSite","@id":"https://www.richeyweb.com/#website","url":"https://www.richeyweb.com/","name":"RicheyWeb","publisher":{"@id":"https://www.richeyweb.com/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.richeyweb.com/search?q={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string","valueMaxLength":256,"valueMinLength":2,"valuePattern":"^[A-Za-z0-9\\s]+$"}},"creator":{"@id":"https://www.richeyweb.com/#organization"},"copyrightHolder":{"@id":"https://www.richeyweb.com/#organization"}},{"@type":"WebPage","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#webpage","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update","name":"Trigger Indexing API for Contact on Linked User Update","description":"\"Boost Joomla SEO with Content - Indexing API plugin. Triggers Google/Bing indexing on content updates. Learn to integrate with 3rd-party components easily.","isPartOf":{"@id":"https://www.richeyweb.com/#website"},"about":{"@id":"https://www.richeyweb.com/#organization"},"inLanguage":"en-GB"},{"@type":"Article","image":{"@type":"ImageObject","url":"https://www.richeyweb.com/images/tutorialmemes/woman-yelling-at-cat.webp","contentUrl":"https://www.richeyweb.com/images/tutorialmemes/woman-yelling-at-cat.webp","width":{"@type":"QuantitativeValue","value":680,"unitCode":"PX"},"height":{"@type":"QuantitativeValue","value":382,"unitCode":"PX"},"caption":"Trigger Indexing API for Contact on Linked User Update","representativeOfPage":true},"headline":"Trigger Indexing API for Contact on Linked User Update","description":"\"Boost Joomla SEO with Content - Indexing API plugin. Triggers Google/Bing indexing on content updates. Learn to integrate with 3rd-party components easily.","author":{"@type":"Person","name":"Michael Richey","url":"https://www.richeyweb.com/contact-us","@id":"https://www.richeyweb.com/contact-us#person"},"datePublished":"2025-03-09T00:00:00+00:00","dateModified":"2025-11-25T00:00:00+00:00","about":["Content - Indexing API",{"@type":"Thing","@id":"https://www.richeyweb.com/software/joomla/plugins/content-indexing-api/#softwareapplication","name":"Content - Indexing API","sameAs":["https://extensions.joomla.org/extension/site-management/seo-a-metadata/content-indexing-api/","https://en.wikipedia.org/wiki/Content_-_Indexing_API"]},"Content management system",{"@type":"Thing","name":"Content management system","sameAs":["https://en.wikipedia.org/wiki/Content_management_system","https://www.wikidata.org/wiki/Q131093","https://g.co/kg/m/0k23c"]},"Google Search",{"@type":"WebSite","name":"Google Search","sameAs":["https://en.wikipedia.org/wiki/Google_Search","https://www.wikidata.org/wiki/Q9366","https://g.co/kg/m/0387r"]},"Microsoft Bing",{"@type":"Thing","name":"Microsoft Bing","sameAs":["https://en.wikipedia.org/wiki/Microsoft_Bing","https://www.wikidata.org/wiki/Q182496","https://g.co/kg/m/0bx7rw"]},"Web indexing",{"@type":"Thing","name":"Web indexing","sameAs":["https://en.wikipedia.org/wiki/Web_indexing","https://www.wikidata.org/wiki/Q1958286","https://g.co/kg/m/085sf"]},"Search engine indexing",{"@type":"Thing","name":"Search engine indexing","sameAs":["https://en.wikipedia.org/wiki/Search_engine_indexing","https://www.wikidata.org/wiki/Q2258979","https://g.co/kg/m/0266gw4"]},"Technical documentation",{"@type":"Thing","name":"Technical documentation","sameAs":["https://en.wikipedia.org/wiki/Technical_documentation","https://www.wikidata.org/wiki/Q1413406","https://g.co/kg/m/0521g6n"]}],"mentions":[{"@type":"Thing","name":"IndexNow","sameAs":["https://en.wikipedia.org/wiki/IndexNow","https://www.wikidata.org/wiki/Q135103499","https://g.co/kg/g/11yfh6n86d"]},"Plug-in",{"@type":"Thing","name":"Plug-in","sameAs":["https://en.wikipedia.org/wiki/Plug-in_(computing)","https://www.wikidata.org/wiki/Q3906765","https://g.co/kg/m/05x35"]},"Software developer",{"@type":"Thing","name":"Software developer","sameAs":["https://en.wikipedia.org/wiki/Software_developer","https://www.wikidata.org/wiki/Q183888","https://g.co/kg/g/121pkf9q"]},"Commercial software",{"@type":"Thing","name":"Commercial software","sameAs":["https://en.wikipedia.org/wiki/Commercial_software","https://www.wikidata.org/wiki/Q1340793","https://g.co/kg/m/07s5b67"]},"Open-source software",{"@type":"Thing","name":"Open-source software","sameAs":["https://en.wikipedia.org/wiki/Open-source_software","https://www.wikidata.org/wiki/Q1130645","https://g.co/kg/m/01pjyj"]}],"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#article","isPartOf":{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#webpage"},"publisher":{"@id":"https://www.richeyweb.com/#organization"},"keywords":"indexing api example","articleSection":"Indexing API","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update","hasPart":[{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-but-why-would-you-want-to-do-that_2_1"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-a-indexing-api-user-plugin_2_2"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-joomla-plugin-user-indexingapiuser_3_3"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-indexingapiuser-xml_3_4"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-indexingapi-src-extension-indexingapiuser-php_3_5"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-public-function-onuseraftersave_3_6"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-testing-the-contacts-the-last-step-before-indexing_3_7"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-private-function-sendtoindexingapi_3_8"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-this-is-too-much_2_9"},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#faqpage"}]},{"@type":"FAQPage","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#faqpage","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update","isPartOf":{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#article"},"mainEntityOfPage":{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#webpage"},"mainEntity":[{"@type":"Question","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#question-0","name":"If you're charging to develop plugins that interface with Content - Indexing API, then why did you make a tutorial?","acceptedAnswer":{"@type":"Answer","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#answer-0","text":"Because I don't want to build these plugins.  I want it to be so easy for 3rd party developers to do it, that they just do it and recommend users to come to me.  The $200/$400 options are so that I can be compensated for the inconvenience of dealing with someone else's laziness."}},{"@type":"Question","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#question-1","name":"Did you just call me lazy?","acceptedAnswer":{"@type":"Answer","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#answer-1","text":"No, I called 3rd party developers lazy for not wanting to spend the hour it takes to write this plugin."}},{"@type":"Question","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#question-2","name":"But I am a 3rd party developer, did you just call me lazy.","acceptedAnswer":{"@type":"Answer","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#answer-2","text":"Oh, I supposed that I did."}},{"@type":"Question","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#question-3","name":"If I pay $400 for exclusive rights, can I sell it on my own website?","acceptedAnswer":{"@type":"Answer","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#answer-3","text":"Sure, that's what you're paying for. If you ever need updates, however, it's going to be another $400 to have me make them AND keep it closed."}},{"@type":"Question","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#question-4","name":"What are you going to do with the $200 plugin I paid for?","acceptedAnswer":{"@type":"Answer","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#answer-4","text":"I'm going to put it on my website for everyone to use, as an example of my work, and as a gift to the Joomla community that has given me so much. You'll get credit too."}},{"@type":"Question","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#question-5","name":"Your sales pitch sucks.","acceptedAnswer":{"@type":"Answer","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#answer-5","text":"Yes, I'm not a salesman - I'm a developer.  I can't stand salesmen.  I don't want to be a salesman.  My offers are black and white - take it or don't."}}]},{"@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex","@type":"ItemList","name":"Trigger Indexing API for Contact on Linked User Update","numberOfItems":9,"itemListElement":[{"@type":"ListItem","position":1,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-but-why-would-you-want-to-do-that_2_1","name":"But Why Would You Want To Do That?","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-but-why-would-you-want-to-do-that_2_1"}},{"@type":"ListItem","position":2,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-a-indexing-api-user-plugin_2_2","name":"A Indexing API User Plugin","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-a-indexing-api-user-plugin_2_2"}},{"@type":"ListItem","position":3,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-joomla-plugin-user-indexingapiuser_3_3","name":"Joomla\\Plugin\\User\\IndexingAPIUser","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-joomla-plugin-user-indexingapiuser_3_3"}},{"@type":"ListItem","position":4,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-indexingapiuser-xml_3_4","name":"indexingapiuser.xml","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-indexingapiuser-xml_3_4"}},{"@type":"ListItem","position":5,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-indexingapi-src-extension-indexingapiuser-php_3_5","name":"indexingapi/src/Extension/IndexingAPIUser.php","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-indexingapi-src-extension-indexingapiuser-php_3_5"}},{"@type":"ListItem","position":6,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-public-function-onuseraftersave_3_6","name":"public function onUserAfterSave","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-public-function-onuseraftersave_3_6"}},{"@type":"ListItem","position":7,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-testing-the-contacts-the-last-step-before-indexing_3_7","name":"Testing the Contacts - the Last Step Before Indexing","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-testing-the-contacts-the-last-step-before-indexing_3_7"}},{"@type":"ListItem","position":8,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-private-function-sendtoindexingapi_3_8","name":"private function sendToIndexingAPI","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-private-function-sendtoindexingapi_3_8"}},{"@type":"ListItem","position":9,"item":{"@type":"WPHeader","@id":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#articleindex-toc-this-is-too-much_2_9","name":"This is too much!!!","url":"https://www.richeyweb.com/software/examples/indexing-api/trigger-indexing-api-for-contact-on-linked-user-update#toc-this-is-too-much_2_9"}}]}]}
```
