It looks like you are confusing two different numbers:
adb get-serialno
gives you the serial number of the device.
Link in your question is referring to IMEI number which can be obtained by adb shell service call iphonesubinfo 1
(see this and this for more)
Going by the context, you should use the first number (serial number) and not IMEI number.
Both serial and IMEI numbers are usually found in the about phone section in device settings.
Edit: Post the edit made by OP, I entered my device IMEI number and it returned the following info, only format shared here, not actual digits
IMEI.info: TAC: AAAAAA FAC: BB SNR: CCCCCC CD: D
[1]
The serial number you are referring to SNR above is the 6 digit (6 C's) is the serial number, which is manufacturer-defined,
NOT the serial number returned by adb
(verified, adb command returns 8 digit serial number)
So, the answer remains same, use the adb command output
Additional Info
[1]: Output in the linked site corresponds to pre 2004
format
As of 2004, the format of the IMEI is AA-BBBBBB-CCCCCC-D
, although it may not always be displayed this way
(see section - Structure of the IMEI and IMEISV (IMEI software version) in the IMEI wiki
adb devices
will display device serialno