Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are currently three four optional modules in the CSU Central Package that can be enabled in your local package custom.js file.

  • sendSMS – adds a send-to option to text the title's call number to a phone number.
  • reportProblem – adds a prominent 'report a problem' link to the service container on the full record page.
  • multipleAnalytics – adds Google or Matomo Analytics to Primo
  • customUResolver – replaces Get It Menu with one of our own design


To enable an optional module, you must do two things:

...

Each module has configurations that also need to be set, including the property to enable the feature in the interface.  Add the corresponding code for each module directly below the code in step 1.

sendSMS

This module only requires one property be set, to enable the module.

...

app.constant('smsCarriers', {
'ATT': 'txt.att.net',
'Cricket': 'mms.mycricket.com',
'Nextel': 'messaging.nextel.com',
'Project Fi': 'msg.fi.google.com',
'Qwest': 'qwestmp.com',
'Sprint': 'messaging.sprintpcs.com',
'T-Mobile': 'tmomail.net',
'Verizon': 'vtext.com',
'Virgin': 'vmobl.com'
});

reportProblem

This module requires you to se the email address that will receive the problem report.  Also enable the module.

...

app.constant('reportProblem', {
to: 'dwalker@calstate.edu',
enabled: true,
messageText: 'See something that doesn\'t look right?', // text that appears before the link
buttonText: 'Report a Problem', // the portion of the text that is the link
subject: 'Problem report', // email subject line
});

multipleAnalytics

Set the siteSource to either ga for Google Analytics or matomo for Matomo Analytics.

...

app.constant('analyticsOptions', {
enabled: true,
siteSource: 'ga',
siteId: 'UA-12345678-1',
siteUrl: 'https://www.google-analytics.com/analytics.js',
defaultTitle: 'OneSearch'
});

customUresolver