Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Does somebody have a version of this module for Drupal 8?
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff-2753275-4-2753275-11.txt | 1.09 KB | siliconmeadow |
#11 | drupal_8_roadmap-2753275-11.patch | 28.9 KB | siliconmeadow |
Comments
Comment #2
Darren Shelley CreditAttribution: Darren Shelley as a volunteer commentedI needed this for a project I'm working on.
I've completed the upgrade from 7 to 8 (based on the latest stable release 7.x-1.1)
Any and all feedback greatly appreciated.
As per 7.x-1.1 I have implemented the segmentio_info hook and the optional user/node functionality out of the box.
The implementation has changed slightly to make the Javascript more cacheable and reduce the amount of potentially rogue javascript
Instead of returning custom javascript you alter a variable array. For instance:
New Functionality
I've created an event_track function that will trigger an analytics.track() call on the successive page load. For Instance:
segmentio_set_track_event('Peeling a fruit', array('fruit' => 'banana');
This should make it easier to track dynamic interactions.
Comment #3
Darren Shelley CreditAttribution: Darren Shelley as a volunteer commentedPlease find attached zip of the Drupal 8 version
Comment #4
gobinathmI will review this today. Would it be possible for you to maybe submit this as a patch ?
Comment #5
Darren Shelley CreditAttribution: Darren Shelley as a volunteer commentedOf course. The patch attached converts 7.x-1.x-dev to the Drupal 8 version.
Comment #6
Darren Shelley CreditAttribution: Darren Shelley as a volunteer commentedUpdating the status to "Needs Review"
Comment #8
Darren Shelley CreditAttribution: Darren Shelley as a volunteer commentedPlease disregard the PHPLint failure, this stems from the fact the issue is tagged 7.x-1.x but the code is D8 where use of short array syntax is encouraged (Drupal 8 requires version PHP 5.5.9 or later).
Comment #9
siliconmeadow CreditAttribution: siliconmeadow at Capgemini commentedI've applied the patch file from #5, and when I try to enable the module, I get the error:
Error: Redefinition of parameter $form_state in /var/www/drupalvm/drupal/web/modules/contrib/segmentio/src/Form/SegmentioAdminSettingsForm.php, line 45
I could supply the whole stack trace, but it would appear that:
public function buildForm(array $form_state, FormStateInterface $form_state) {
should actually be:
public function buildForm(array $form, FormStateInterface $form_state) {
Comment #10
siliconmeadow CreditAttribution: siliconmeadow at Capgemini commentedAlso with the
segmentio.links.menu.yml
file, having the link in the description caused the admin page to render like this:I've tried a variety of different variations, but I could only get it to work was by removing the link.
Comment #11
siliconmeadow CreditAttribution: siliconmeadow at Capgemini commentedAddresses the points in #9 and #10.
Comment #12
siliconmeadow CreditAttribution: siliconmeadow at Capgemini commentedComment #14
siliconmeadow CreditAttribution: siliconmeadow at Capgemini commentedI converted this back to Needs review, due to the reason Darren Shelley mentioned in #8.
It would be useful if this could be made the 8.x-1.x-dev branch so we can get the true benefit of the testbot.
Comment #15
Sharique CreditAttribution: Sharique as a volunteer commentedThe code looks good. Patch applied perfectly. +1 for RTBC.
I didn't have segmantio account, so couldn't test it with it.
Comment #16
Darren Shelley CreditAttribution: Darren Shelley as a volunteer commentedGood catch @siliconmeadow. +1 for RTBC
Comment #18
gobinathm